const rules = [
{
pattern: 'Should have one of the roles: listbox, dialog.',
description:
'Can by set by roledialog',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should be accessible for accessibility tree.',
description: 'Children should be focusable and tabable',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should be displayed on trigger hover and focus.',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should be dismissable by pressing Esc.',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should be persistent.',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should be linked to the trigger.',
comment: 'Trugger is linking popover by aria-controls.',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should respect Windows High Contrast mode.',
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should have a content with 4.5:1 contrast ratio against the background.',
comment: 'Content colors should relate to the Popover background color.',
status: 'DONE',
tests: 'N/A',
},
{
pattern: 'Should respect prefers reduce motion settings.',
status: 'DONE',
tests: 'N/A',
},
{
pattern: 'Should be usable both on desktop and mobile.',
status: 'TO DO',
tests: 'TO DO',
},
{
pattern: 'Should provide information if is expanded.',
comment: `The aria-expanded should have true value when it is expanded.`,
status: 'DONE',
tests: 'TO DO',
},
{
pattern:
'Should, after closing, return focus to the element that invoked the Popover.',
status: 'TO DO',
tests: 'N/A',
},
{
pattern: 'Can have an accessible description.',
comment: `Can be described by a value (IDREF) set for the aria-describedby
prop that refers to a description, or by aria-description`,
status: 'DONE',
tests: 'TO DO',
},
];
export const listboxRules = [
{
pattern: 'Should be linked to the trigger.',
comment: `The aria-haspopup="listbox" and aria-controls attributed should reference element with role listbox.`,
status: 'DONE',
tests: 'TO DO',
},
{
pattern:
'Should be opened by pressing Space/Enter and mouse click.',
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should have children with roles: `option` or `group`.',
description: 'Should be implemented by the developer.',
status: 'N/A',
tests: 'N/A',
},
{
pattern: 'Should have arrow navigation.',
description: 'Should be implemented by the developer.',
status: 'N/A',
tests: 'N/A',
},
];
export const dialogRules = [
{
pattern: 'Should have an accessible name.',
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 a visible dialog title.`,
status: 'DONE',
tests: 'TO DO',
},
{
pattern: 'Should have focus trap.',
status: 'DONE',
tests: 'N/A',
},
];
export default rules;