Verified against Claude · 2026-07-19
Run an accessibility audit on a component before it ships
A component-level a11y audit that checks role-specific WCAG success criteria against actual JSX — not a generic "add aria-label everywhere" pass.
The prompt
Ready to copy — highlighted parts are example details you can swap.
<role> You are auditing a single React component for accessibility issues that would actually fail a screen-reader or keyboard-only user, not producing a generic checklist. </role> <component> A custom Dropdown component built from a styled div with an onClick handler, an absolutely positioned list of divs for options, no keyboard handling. </component> <component_type> combobox / custom select dropdown </component_type> <target_level> Target: AA </target_level> <audit_focus> For this component type, check specifically: - Keyboard operability: can every interactive element be reached and operated with Tab/Shift+Tab/Enter/Space/Escape/arrow keys as appropriate for its role, with no keyboard trap? - Focus management: on open/close (if this is a modal, menu, or disclosure), does focus move to the right place and return to the trigger on close? - Semantics: does it use the correct native element or ARIA role for what it is, rather than a styled div with onClick standing in for a button or link? - Name and state exposed to assistive tech: does every control have an accessible name, and do state changes (expanded/collapsed, selected, invalid) get exposed via ARIA attributes, not just visually? - Color and motion: any information conveyed by color alone, and any animation that should respect prefers-reduced-motion? </audit_focus> <output_format> A table: Issue | WCAG criterion (number and name) | Who it affects | Severity (blocker/major/minor) | Fix. Then flag which issues you couldn't fully assess from static code alone (real color-contrast values, actual screen-reader announcement order) and what manual check would confirm them. </output_format>
Customize the highlighted detailsoptional — the prompt above already works
Why this works
Grounding the audit in component_type is what makes the checklist specific instead of generic: a modal's real failure modes (focus trap on open, Escape to close, focus returning to the trigger) are different from a combobox's (arrow-key navigation between options, aria-activedescendant tracking the highlighted item, aria-expanded reflecting open state) — a plain "check accessibility" prompt tends to default to boilerplate aria-label suggestions regardless of what the component actually is. Citing real WCAG success-criterion numbers keeps every finding falsifiable — a reviewer can go look up 2.1.1 Keyboard or 4.1.2 Name, Role, Value and confirm or reject the finding — instead of an unverifiable "this might be an issue." The explicit instruction to flag what can't be assessed from static code alone matters because color contrast against a real rendered background and actual screen-reader announcement order are things a code review genuinely cannot verify, and naming that boundary stops the model from confidently asserting a pass/fail it isn't in a position to make.
What you get back
Issue | WCAG criterion | Who it affects | Severity | Fix Div used as trigger, no role/keyboard support | 2.1.1 Keyboard, 4.1.2 Name/Role/Value | Keyboard and screen-reader users | blocker | Use a real <button> with aria-haspopup="listbox" and aria-expanded No focus moves into the option list on open | 2.4.3 Focus Order | Keyboard and screen-reader users | blocker | Move focus to the first option (or the listbox) on open, return focus to the trigger on close Selected option shown only via a checkmark icon | 1.4.1 Use of Color | Low-vision users | major | Add aria-selected and a text/shape cue, not color alone Not assessable from code: actual contrast ratio of the checkmark icon against its background — confirm with a contrast checker on the rendered page.
Verified against
Claude Sonnet 4.6 · 2026-07-19
ChatGPT GPT-5.1 · 2026-07-23
Changelog
- 2026-07-19 — Initial publish, verified against Claude (Sonnet 4.6) and ChatGPT (GPT-5.1) against WCAG 2.2 AA.
Need this built into your business?
If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.
EXPLORE CUSTOM SOFTWARE

