const rules = [
{
pattern: 'Should have an accessible name.',
comment: `Name should be meaningful (ex. "Read more about vitamin C" instead of "Read more").
aria-label can be used to provide a name.`,
status: 'DONE',
tests: 'DONE',
},
{
pattern: 'Should have a role link.',
status: 'DONE',
tests: 'DONE',
},
{
pattern:
'Should cause the user agent to navigate to a new resource.',
status: 'DONE',
tests: 'N/A',
},
{
pattern: 'Should be focusable and tabable.',
comment: "href can't be empty.",
status: 'DONE',
tests: 'DONE',
},
{
pattern: 'Should have a non-color indicator.',
comment: `Ex. underline, bold (italic is not accessible). Default Link weight is bold.
underlined, emphasised or weight props can also be provided.`,
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should have a color indicator with 4.5:1 contrast ratio to the background.',
comment: `Default Link color is text-blue-60 (contrast against white: 9.11:1).
Another text-color may also be specified to meet this requirement.`,
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should have a color indicator with 3:1 contrast ratio to the surrounding text.',
comment: `Default Link color is text-blue-60 (contrast against black: 2.3:1,
too low contrast is compensated by bold weight). Another text-color may also be
specified to meet this requirement.`,
status: 'TO DO',
tests: 'N/A',
},
{
pattern: 'Should have cursor: pointer.',
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should be activated by pressing Enter and mouse click.',
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Can have an accessible label (and/or icon) that indicates opening in new tab.',
status: 'DONE',
tests: 'DONE',
},
{
pattern:
'Can have an accessible label with file size&format (and/or icon) that indicates downloading a file.',
status: 'TO DO',
tests: 'TO DO',
},
];
export const asButtonRules = [
{
pattern: 'Should have an accessible name.',
comment: `Name should be meaningful (ex. "Read more about vitamin C" instead of "Read more").
aria-label can be used to provide a name.`,
status: 'DONE',
tests: 'DONE',
},
{
pattern: 'Should have a role button.',
status: 'DONE',
tests: 'DONE',
},
{
pattern: 'Should be focusable and tabable.',
status: 'DONE',
tests: 'DONE',
},
{
pattern: 'Should have a non-color indicator.',
comment: `Ex. underline, bold (italic is not accessible). Default Link weight is bold.
underlined, emphasised or weight props can also be provided.`,
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should have a color indicator with 4.5:1 contrast ratio to the background.',
comment: `Default Link color is text-blue-60 (contrast to white: 9.11:1).
Another text-color may also be specified to meet this requirement.`,
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should have a color indicator with 3:1 contrast ratio to the surrounding text.',
comment: `Default Link color is text-blue-60 (contrast to black: 2.3:1,
too low contrast is compensated by bold weight). Another text-color may also
be specified to meet this requirement.`,
status: 'TO DO',
tests: 'N/A',
},
{
pattern: 'Should have cursor: pointer.',
status: 'DONE',
tests: 'N/A',
},
{
pattern:
'Should fire onClick on Space/Enter press and mouse click.',
status: 'DONE',
tests: 'DONE',
},
{
pattern: 'Should have a visible disabled state.',
status: 'DONE',
tests: 'N/A',
},
];
export default rules;