diff --git a/.claude/commands/a11y-audit.md b/.claude/commands/a11y-audit.md index 243075afd..e3b7ac8d9 100644 --- a/.claude/commands/a11y-audit.md +++ b/.claude/commands/a11y-audit.md @@ -100,6 +100,60 @@ Switch to code-aware audit mode. Focus on issues that require human judgement: --- +## Component Rules (WCAG 2.2 / WAI-ARIA APG) + +Guardrails to apply when building or fixing any interactive component. Check every +one during Phase 2; each cites the normative criterion it enforces. + +- **Toggle buttons keep a constant accessible name.** A control with `aria-expanded` + must not swap its name between states ("Open menu" / "Close menu"). Name it for + what it controls ("Menu") and let `aria-expanded` carry open/closed; otherwise the + state is announced twice and can contradict itself. (WAI-ARIA APG.) +- **Do not name a landmark redundantly, or invent a name for a region.** A `