|
| 1 | +/** |
| 2 | + * Manual Accessibility Testing Checklist |
| 3 | + * |
| 4 | + * Automated tools (axe-core, Lighthouse, jest-axe) catch most WCAG 2.1 AA |
| 5 | + * violations, but several categories require a human to actually try the |
| 6 | + * page. This prints that checklist so `npm run a11y:manual` has something |
| 7 | + * to run — it previously pointed at a script that didn't exist in this repo. |
| 8 | + */ |
| 9 | + |
| 10 | +const CHECKLIST = [ |
| 11 | + { |
| 12 | + category: 'Keyboard navigation', |
| 13 | + items: [ |
| 14 | + 'Tab through the entire page — every interactive element is reachable and in a logical order', |
| 15 | + 'Focus is always visible (no invisible focus outlines)', |
| 16 | + 'No keyboard trap: focus can always move forward and backward out of any widget', |
| 17 | + 'Modals/dialogs trap focus while open and return it to the trigger on close', |
| 18 | + 'Skip-to-content link is the first focusable element and actually works', |
| 19 | + ], |
| 20 | + }, |
| 21 | + { |
| 22 | + category: 'Screen reader (VoiceOver / NVDA / JAWS)', |
| 23 | + items: [ |
| 24 | + 'Page landmarks (banner, main, navigation, contentinfo) are announced correctly', |
| 25 | + 'Headings form a logical, non-skipping hierarchy', |
| 26 | + 'Form fields announce their label, required state, and any validation error', |
| 27 | + 'Live regions (toasts, status updates) are announced without moving focus', |
| 28 | + 'Images convey their alt text (or are correctly marked decorative)', |
| 29 | + ], |
| 30 | + }, |
| 31 | + { |
| 32 | + category: 'Color & contrast', |
| 33 | + items: [ |
| 34 | + 'Text meets 4.5:1 contrast (3:1 for large text) in both light and dark mode', |
| 35 | + 'Information is never conveyed by color alone (e.g. status badges also use text/icons)', |
| 36 | + 'Focus indicators meet 3:1 contrast against their background', |
| 37 | + ], |
| 38 | + }, |
| 39 | + { |
| 40 | + category: 'Zoom & reflow', |
| 41 | + items: [ |
| 42 | + 'Page is usable at 200% browser zoom with no horizontal scroll or clipped content', |
| 43 | + 'Page is usable at 400% zoom in a 1280px viewport (WCAG 1.4.10 reflow)', |
| 44 | + ], |
| 45 | + }, |
| 46 | + { |
| 47 | + category: 'Motion & animation', |
| 48 | + items: [ |
| 49 | + 'prefers-reduced-motion is respected for any animated transitions', |
| 50 | + 'No content flashes more than 3 times per second', |
| 51 | + ], |
| 52 | + }, |
| 53 | +]; |
| 54 | + |
| 55 | +function printChecklist() { |
| 56 | + console.log('Manual Accessibility Testing Checklist (WCAG 2.1 AA)\n'); |
| 57 | + for (const { category, items } of CHECKLIST) { |
| 58 | + console.log(category); |
| 59 | + for (const item of items) { |
| 60 | + console.log(` [ ] ${item}`); |
| 61 | + } |
| 62 | + console.log(''); |
| 63 | + } |
| 64 | + console.log('Run alongside `npm run test:a11y`, `npm run lighthouse`, and `npm run axe`.'); |
| 65 | +} |
| 66 | + |
| 67 | +printChecklist(); |
0 commit comments