Skip to content

accessibility

Use when implementing WCAG-compliant interfaces, ARIA patterns, keyboard navigation, focus management, or screen reader support. Also use when auditing component accessibility, fixing contrast issues, or building accessible forms, modals, and navigation.

ModelSource
sonnetpack: frontend
Full Reference

┏━ πŸ”§ accessibility ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when implementing WCAG-compliant interface… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

WCAG 2.2 is the current standard (ISO/IEC 40500:2025). Three levels: A (minimum), AA (legal standard β€” target this), AAA (enhanced).

RuleRequirement
Text contrast (normal)4.5:1 AA Β· 7:1 AAA
Text contrast (large: 18pt / 14pt bold)3:1 AA Β· 4.5:1 AAA
Non-text contrast (borders, icons)3:1 AA
Focus β€” not fully obscured2.4.11 AA (new in 2.2)
Focus indicator size + contrast2px perimeter + 3:1 (2.4.13 AAA)
Touch targets24Γ—24 CSS px minimum (2.5.8 AA, new in 2.2)
ARIA first ruleNative HTML before ARIA
Live region timingContainer must be in DOM before content injected
Test environmentUse jsdom β€” axe-core incompatible with happy-dom
FileWhen to read
reference/wcag-overview.mdPOUR principles, conformance levels, all 9 new WCAG 2.2 criteria
reference/semantic-html.mdNative element vs ARIA equivalents, landmark regions, heading hierarchy
reference/aria.mdFive rules of ARIA, accessible names, states, roles catalog, when NOT to use ARIA
reference/keyboard-nav.mdFocus order, skip links, roving tabindex, standard keyboard patterns per widget
reference/focus-management.mdFocus visibility CSS, useFocusTrap implementation, focus restoration, sticky header fix
reference/color-contrast.mdContrast ratio tables, non-text contrast, testing tools, color-only information
reference/component-patterns.mdModal dialog, tabs, accordion, toast/notification, combobox β€” full implementations
reference/forms.mdLabels, required fields, error messaging, live validation timing, grouping, autocomplete
reference/images-media.mdAlt text decision tree, video/audio requirements, media caption matrix
reference/testing.mdaxe-core with Vitest/Jest/Playwright, manual checklist, screen reader matrix

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.