Accessibility audit (WCAG 2.2 AA)
Automated tools find a minority of accessibility problems. Use them first, then do the manual checks; never report “accessible” from an automated pass alone.
1. Automated pass
- Static HTML/templates:
python3 scripts/a11y_lint.py path/to/page.html(or a directory). Checks: missinglang, missing/empty<title>, images withoutalt, inputs without labels, buttons and links without accessible names, empty headings, skipped heading levels, multiple<h1>, positivetabindex,onclickon non-interactive elements without a role and keyboard handler, duplicate IDs,<a>withouthrefused as a button, autoplaying media,user-scalable=no/maximum-scale=1in the viewport meta, and ARIA references to missing IDs. - Rendered pages, if a browser is available: axe-core (via
@axe-core/cli, Playwright +@axe-core/playwright, or the browser extension) and Lighthouse’s accessibility category. - Component code (React/Vue/Svelte): look for the same patterns in JSX/templates;
eslint-plugin-jsx-a11ycatches many in React.
2. Manual checks (do them; automated tools cannot)
Keyboard (WCAG 2.1.1, 2.1.2, 2.4.3, 2.4.7, 2.4.11)
- Tab through the whole page: every interactive element reachable, in a logical order, no traps.
- Focus is always visible and not hidden behind sticky headers or cookie banners.
- Custom widgets (menus, tabs, dialogs, comboboxes) follow the ARIA Authoring Practices keyboard patterns: arrows inside composite widgets, Escape closes, focus moves into dialogs and returns to the trigger.
Names, roles, states (1.1.1, 1.3.1, 4.1.2)
- Prefer native elements (
<button>,<a href>,<input>,<dialog>,<details>) overdiv+ ARIA. - Icon-only buttons have an accessible name (
aria-labelor visually hidden text). - Decorative images have
alt=""; informative images describe the information, not the picture. - State is exposed:
aria-expanded,aria-pressed,aria-current,aria-invalid,aria-selectedas appropriate.
Structure (1.3.1, 2.4.1, 2.4.2, 2.4.6)
- One
<h1>, headings in order, landmarks (header,nav,main,footer), a skip link for long navigation. - Page titles unique and descriptive.
Visual (1.4.3, 1.4.10, 1.4.11, 1.4.12, 1.4.4)
- Text contrast at least 4.5:1 (3:1 for large text); UI components and focus indicators at least 3:1 (use the
color-contrastskill). - Works at 320 CSS px wide without horizontal scrolling (reflow) and at 200% zoom.
- Information is not conveyed by color alone.
Motion and media (2.2.2, 2.3.3, 1.2.x)
- Respect
prefers-reduced-motion; nothing flashes more than three times per second. - Video has captions; autoplaying content can be paused.
Pointer (2.5.8)
- Targets at least 24x24 CSS px or with enough spacing.
Forms: see the accessible-forms skill.
3. Report and fix
Group findings by severity (blocks a task / makes it hard / minor), each with: element or file:line, WCAG success criterion number, who is affected (screen reader, keyboard, low vision, cognitive), and the fix as a code diff. Fix the blockers first. Re-run the automated pass after fixing.
Say clearly what was not tested (e.g. “not tested with a real screen reader”) rather than implying full conformance.