const rules = [ { pattern: 'Should have role combobox.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should have an accessible label.', comment: `Can be named by a label specified by aria-label prop or a value (IDREF) set for the aria-labelledby prop that refers to an element.`, status: 'DONE', tests: 'DONE', }, { pattern: 'Should be focusable and tabable.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should not be interactive when disabled.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should have 4.5:1 contrast ratio against the background.', comment: 'gray-60 against white: 7.9:1, black against white: 21:1.', status: 'DONE', tests: 'N/A', }, { pattern: 'Should have visible selected / unselected / disabled style.', comment: 'Lighter colors indicate disabled state, unselected uses placeholder, selected displays selected value.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should have visible focus and hover style.', status: 'DONE', tests: 'N/A', }, { pattern: 'Should respect Windows High Contrast mode.', status: 'DONE', tests: 'N/A', }, { pattern: 'Should respect prefers reduce motion settings.', status: 'DONE', tests: 'N/A', }, { pattern: 'Should have descriptive information about required and invalid state.', comment: 'Invalid state is indicated by color change. Both states can be described using aria-describedby.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should provide information if is expanded.', comment: `The aria-expanded should have true value when it is expanded.`, status: 'DONE', tests: 'DONE', }, { pattern: 'Should provide information about the linked popup.', comment: `The aria-haspopup="listbox" and aria-controls attributed should reference element with role listbox.`, status: 'DONE', tests: 'DONE', }, { pattern: 'Should open listbox by pressing Space/Enter and mouse click.', status: 'TO DO', // Enter does not work tests: 'DONE', }, { pattern: 'Should have aria-multiselectable=true when more than one option can be selected', status: 'DONE', tests: 'DONE', }, { pattern: 'Can have an accessible description.', comment: 'Can be described by setting a value for aria-describedby attribute.', status: 'DONE', tests: 'DONE', }, ]; export const selectOptionRules = [ { pattern: 'Should have role option.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should be contained in, or owned by, an element with role listbox.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should indicate selection.', comment: 'aria-selected should be true when option is selected. Selected option has a visual indicator.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should not contain interactive elements.', comment: 'Checkbox for multiselectable variant is removed from the accessibility tree.', status: 'DONE', tests: 'N/A', }, { pattern: 'Should be selected by pressing Space/Enter and mouse click.', status: 'DONE', tests: 'DONE', }, { pattern: 'Should be focusable on Arrow Down/Arrow Up press.', comment: 'Arrow Down focuses the next option, Arrow Up focuses the previous one.', status: 'DONE', tests: 'N/A', }, ]; export default rules;