Audit Accessibility
Overview
Generate a WCAG 2.1 AA compliance audit for a specific feature or component, organized by the POUR principles (Perceivable, Operable, Understandable, Robust). Produces a concrete checklist with testing instructions, keyboard navigation paths, screen reader expectations, and color contrast requirements.
Workflow
Read feature context -- Scan .chalk/docs/product/ for the PRD describing the feature. Check .chalk/docs/engineering/ for component architecture and any existing a11y guidelines. Read the source code for the feature's UI components to understand the actual implementation.
Parse the audit target -- Extract from $ARGUMENTS the feature, page, or component to audit. If unspecified, ask the user to name a specific feature -- auditing the entire application at once produces shallow results.
Determine the next file number -- Read filenames in .chalk/docs/engineering/ to find the highest numbered file. The next number is highest + 1.
Audit Perceivable -- Check:
- All images have meaningful alt text (decorative images use
alt="")
- Color is not the only means of conveying information
- Text meets contrast ratios (4.5:1 for normal text, 3:1 for large text)
- Content is readable at 200% zoom
- Media has captions or transcripts
Audit Operable -- Check:
- All interactive elements are reachable via keyboard (Tab, Shift+Tab, Enter, Space, Escape, Arrow keys)
- Document the expected keyboard navigation path through the feature
- Focus order matches visual order
- No keyboard traps
- Focus indicators are visible
- Touch targets are at least 44x44 CSS pixels
Audit Understandable -- Check:
- Form inputs have visible labels (not just placeholders)
- Error messages identify the field and describe how to fix the error
- Consistent navigation and naming patterns
- Language is set on the page element
Audit Robust -- Check:
- Semantic HTML elements used appropriately (buttons, links, headings, landmarks)
- ARIA roles, states, and properties are correct and necessary
- Components work with major screen readers (VoiceOver, NVDA, JAWS)
- No ARIA is better than bad ARIA
Write the file -- Save to .chalk/docs/engineering/<n>_a11y_audit_<feature-slug>.md.
Confirm -- Share the file path and highlight the highest-severity issues that block users from completing tasks.
Output
- File:
.chalk/docs/engineering/<n>_a11y_audit_<feature-slug>.md
- Format: Plain markdown with POUR-organized checklist, each item marked pass/fail/needs-review with specific testing instructions
- First line:
# Accessibility Audit: <Feature Name>
Anti-patterns
- Checklist without testing instructions -- "Check color contrast" is not actionable. Specify which elements, what the current ratio is, and what the target ratio should be.
- ARIA overuse -- Adding
role="button" to a <button> is redundant. Adding ARIA to fix semantic HTML problems is treating symptoms. Prefer native HTML elements.
- Keyboard testing only with Tab -- Many components require Arrow keys (tabs, menus, radio groups), Escape (modals, dropdowns), Space (checkboxes), and Enter (buttons, links). Document the full expected keyboard interaction model.
- Ignoring screen reader output -- An element can be technically accessible but produce nonsensical screen reader output. Specify what the screen reader should announce for each interactive element.
- Treating a11y as a one-time audit -- Note which checks should be automated in CI and which require manual testing on each release.
1---2name: audit-accessibility3description: Audit a feature for WCAG 2.1 AA compliance using POUR principles when the user asks to check accessibility, audit a11y, or verify WCAG compliance4---5
6# Audit Accessibility
7
8## Overview
9
10Generate a WCAG 2.1 AA compliance audit for a specific feature or component, organized by the POUR principles (Perceivable, Operable, Understandable, Robust). Produces a concrete checklist with testing instructions, keyboard navigation paths, screen reader expectations, and color contrast requirements.
11
12## Workflow
13
141. **Read feature context** -- Scan `.chalk/docs/product/` for the PRD describing the feature. Check `.chalk/docs/engineering/` for component architecture and any existing a11y guidelines. Read the source code for the feature's UI components to understand the actual implementation.
15
162. **Parse the audit target** -- Extract from `$ARGUMENTS` the feature, page, or component to audit. If unspecified, ask the user to name a specific feature -- auditing the entire application at once produces shallow results.
17
183. **Determine the next file number** -- Read filenames in `.chalk/docs/engineering/` to find the highest numbered file. The next number is `highest + 1`.
19
204. **Audit Perceivable** -- Check:
21 - All images have meaningful alt text (decorative images use `alt=""`)
22 - Color is not the only means of conveying information
23 - Text meets contrast ratios (4.5:1 for normal text, 3:1 for large text)
24 - Content is readable at 200% zoom
25 - Media has captions or transcripts
26
275. **Audit Operable** -- Check:
28 - All interactive elements are reachable via keyboard (Tab, Shift+Tab, Enter, Space, Escape, Arrow keys)
29 - Document the expected keyboard navigation path through the feature
30 - Focus order matches visual order
31 - No keyboard traps
32 - Focus indicators are visible
33 - Touch targets are at least 44x44 CSS pixels
34
356. **Audit Understandable** -- Check:
36 - Form inputs have visible labels (not just placeholders)
37 - Error messages identify the field and describe how to fix the error
38 - Consistent navigation and naming patterns
39 - Language is set on the page element
40
417. **Audit Robust** -- Check:
42 - Semantic HTML elements used appropriately (buttons, links, headings, landmarks)
43 - ARIA roles, states, and properties are correct and necessary
44 - Components work with major screen readers (VoiceOver, NVDA, JAWS)
45 - No ARIA is better than bad ARIA
46
478. **Write the file** -- Save to `.chalk/docs/engineering/<n>_a11y_audit_<feature-slug>.md`.
48
499. **Confirm** -- Share the file path and highlight the highest-severity issues that block users from completing tasks.
50
51## Output
52
53- **File**: `.chalk/docs/engineering/<n>_a11y_audit_<feature-slug>.md`
54- **Format**: Plain markdown with POUR-organized checklist, each item marked pass/fail/needs-review with specific testing instructions
55- **First line**: `# Accessibility Audit: <Feature Name>`
56
57## Anti-patterns
58
59- **Checklist without testing instructions** -- "Check color contrast" is not actionable. Specify which elements, what the current ratio is, and what the target ratio should be.
60- **ARIA overuse** -- Adding `role="button"` to a `<button>` is redundant. Adding ARIA to fix semantic HTML problems is treating symptoms. Prefer native HTML elements.
61- **Keyboard testing only with Tab** -- Many components require Arrow keys (tabs, menus, radio groups), Escape (modals, dropdowns), Space (checkboxes), and Enter (buttons, links). Document the full expected keyboard interaction model.
62- **Ignoring screen reader output** -- An element can be technically accessible but produce nonsensical screen reader output. Specify what the screen reader should announce for each interactive element.
63- **Treating a11y as a one-time audit** -- Note which checks should be automated in CI and which require manual testing on each release.