Accessibility
The design rules already state most accessibility requirements: contrast and colour (C9–C11), focus and states (S8, S9), labels and errors (F1, F5, F8), overlays (O3–O5), keyboard navigation and landmarks (NV13, NV14), headings (T15), icon names (I7); design-mobile owns target size and zoom (M1, M5). They say what must hold. This skill checks it on the rendered page, where most accessibility failures only show, and owns the criteria no rule covers (A1–A14 in references/criteria.md). Read criteria.md in full before step 3; it maps every WCAG 2.2 A/AA criterion to the check that settles it.
A finding owned by a rule keeps that rule's ID and adds the criterion and the evidence: [S8 · P0 · ● 2.4.7]. Severity follows the shared protocol; evidence is:
- ● verified — the scan, the walk or the tree shows it; the report cites what was observed.
- ◐ flagged — evidence is there, a person decides (reading order, alt text quality, a clamp under text spacing).
- ○ needs assistive technology — a screen reader or a person who uses one; handed off, never emulated.
A clean scan is not a pass: an engine settles roughly a third of the criteria. Say what was not checked.
Modes
- Quick — a changed component or one page: steps 2–4 on its states at 1440 and 375. Report P0 and P1.
- Full — a flow or the site: every step on every sampled state.
Without a word from the user: quick after a UI change, full when asked for an audit.
1. Scope and sample
From the request. A full audit of the site samples, each in its base state plus what opens on it:
| Page | States |
|---|---|
Home / (sections in src/widgets/home) | the mobile menu (Sheet) open; the sign-up form empty, with errors, sent (on dev only) |
Privacy /privacy | the mobile menu open |
The site is Ukrainian only (<html lang="uk">). /playground is a specimen page: check it only when asked.
Done when there is a list "page → states" with no "etc.".
2. Bench
- The dev server through
preview_start(a configuration in.claude/launch.json); reuse one that runs. Production only read-only. - Read only. Never send a sign-up form on production — it reaches the business through the site's lead endpoint; never type real personal data. Typing test values to trigger validation is fine.
- Serve the scripts and axe-core locally — axe-core is the version
pnpm-lock.yamlpins (it comes witheslint-plugin-jsx-a11y; pnpm keeps it undernode_modules/.pnpm/axe-core@*/node_modules/axe-core), nothing is downloaded:After each page load, load them in the browser's JavaScript tool (a script tag needs no CORS):A11Y=<scratchpad>/a11y-serve; mkdir -p $A11Y ln -sf <this skill>/scripts/*.js $(ls -d node_modules/.pnpm/axe-core@*/node_modules/axe-core | head -1)/axe.min.js $A11Y/ python3 -m http.server 8766 --bind 127.0.0.1 --directory $A11Y # in the backgroundStop the server when done.for (const f of ["axe.min.js", "axe.js", "keyboard.js", "adapt.js"]) await new Promise((ok, fail) => { const s = document.createElement("script"); s.src = `http://127.0.0.1:8766/${f}`; s.onload = ok; s.onerror = () => fail(new Error(f)); document.head.appendChild(s) }) - The built-in browser works while its pane is visible; a hidden pane may never hydrate — take a screenshot first, or use Playwright (
mcp__playwright__*). Viewport throughresize_window: 1440×900 and themobilepreset (375×812).
Done when the page loads, the scripts load, and __kbd.reset() returns a tabbable count above zero.
3. Engine scan
await __axe() on each state; await __axe({root: "[role=dialog]"}) for an open overlay. Violations with a criterion are ●; incomplete is ◐ — mostly contrast over images and gradients, which design-audit measures on the pixels (scripts/contrast-at.py); best-practice items are P2 unless criteria.md maps them higher. Map each to its owner with the table in criteria.md.
Done when every state has a scan and every violation has an owner.
4. Keyboard walk
__kbd.reset()on the state, then press Tab with the browser tool (key,repeat) the number it returns plus two, at most 100 per press; then__kbd.report(). Long pages: walk in parts, reading the report between them. After opening an overlay or when a banner appears,__kbd.reset()again: an element it has not seen unfocused reportsunknown.- Operate each widget the walk reaches the way a keyboard user would: Enter and Space on buttons and links, arrows in menus, radio groups, tabs, the gallery and carousels; Esc in overlays; Shift+Tab out of a dialog (O3 says where focus must go). Check the result in the tree (step 5) or a screenshot.
- Read the report against criteria.md ("Reading the output"):
noIndicatorandweakIndicatorgo to S8,coveredto A6,jumpsandnotReachedto A5,invisibleto A5 or NV14,skipLinkFirst: falseto NV14.
Done when every state was walked to its end (leftDocument > 0 or every tabbable reached) and every widget was operated.
5. Accessibility tree
read_page (filter all) on each state. Check what the scan cannot judge: landmarks (one main, banner, navigation with distinct names, contentinfo), the heading outline, that each control's name contains its visible label (A8), states on custom widgets — expanded, selected, checked, pressed, the current value of a quantity (A7), image names that say what the image shows (A1), live regions present before their content changes (FB11). Text in the tree that is not on screen, or on screen and not in the tree, is a finding.
Done when every state's tree was read against criteria.md.
6. Adaptation and motion
await __adapt("text200")andawait __adapt("spacing")at 1440 and 375:newlyClippedis text the change cut off (A10);horizontalScrollat 375 goes to L13. Pass{keep: true}and take a screenshot when a finding needs one, thenawait __adapt("reset").await __adapt("motion"), then watch the page for ten seconds: anything that moves, advances or updates on its own for more than five seconds needs a pause (A9). Search the code for what the script cannot see:grep -rnE 'setInterval|[Aa]utoplay|animate-(spin|ping|pulse|bounce)|animation:' src --include='*.tsx' --include='*.css' grep -rnE 'motion-(safe|reduce):|prefers-reduced-motion' src- 320×640 for overflow — owned by
design-mobileand L13; report it there once.
Done when each sampled page ran all three modes and the motion search is read.
7. Cause in code
Trace each finding to a file and line, then up to the source: a class at the use site, a primitive in src/shared/components/ui, a token in src/app/globals.css, or the content (text and images in src/content). One fix in a primitive or a token clears dozens of findings — those go first.
Done when every finding has file:line or names its data source.
8. Report
Follow the shared protocol in ../design-audit/references/review.md, with:
- at the top: scope, the sample, the evidence legend, and a table "page, state → P0 / P1 counts";
- system fixes (a token, a primitive) before single findings, with how many places each clears;
- each finding as
[ID · P0 · ● 2.4.7] where — what was observed. Fix: change.; - Handoff (○): what only a screen reader shows, on which flow, with which pair (VoiceOver with Safari on iOS and macOS, NVDA with Firefox or Chrome on Windows, TalkBack with Chrome on Android);
- Not checked: pages and states outside the sample, criteria not exercised.
Change nothing until the user picks what to fix. After fixing, repeat steps 3–6 on the same states: a finding is closed when the scan rule or the walk field is gone, not when the code changed.