--- name: accessibility description: Accessibility baseline for generated HTML artifacts. Covers contrast, focus, keyboard behavior, labels, touch targets, motion safety, semantics, and common failure patterns. mode: reference platform: web scenario: horizontal-craft preview: type: none default_for: - accessibility - a11y - WCAG - focus visible - keyboard - form labels fidelity: system sources: - adapted-from-open-design/craft/accessibility-baseline.md --- # Accessibility This file defines the accessibility baseline for generated design artifacts. The active design system decides how it looks; this file decides what cannot be broken. Target **WCAG 2.2 AA** as the practical working baseline unless the user specifies another compliance target. --- ## Contrast Minimums: | Pair | Minimum | |---|---:| | Normal text | 4.5:1 | | Large text | 3:1 | | Non-text UI and graphical objects | 3:1 | | Focus indicator vs adjacent state | 3:1 | Do not round up. `2.99:1` fails a `3:1` check. Avoid low-contrast muted text, especially opacity-based text on dark or colored backgrounds. --- ## Focus visibility - Every interactive element must have visible `:focus-visible` styling. - Never remove focus outline without an accessible replacement. - Focus indicator should be visible by shape, outline, underline, or offset — not color alone. - Modals must trap focus while open and return focus to the opener when closed. --- ## Keyboard behavior - Native `