--- name: form-accessibility description: WCAG 2.2 AA compliance for forms, ARIA patterns, focus management, keyboard navigation, and screen reader support. Use when implementing accessible forms in any framework. The compliance foundation that ensures forms work for everyone. --- # Form Accessibility WCAG 2.2 AA compliance patterns for forms. Ensures forms work for keyboard users, screen reader users, and users with cognitive or motor disabilities. ## Quick Start ```tsx // Accessible form field pattern
{/* 1. Visible label (never placeholder-only) */} {/* 2. Hint text (separate from label) */} We'll send your confirmation here {/* 3. Input with full ARIA binding */} {/* 4. Error message (announced by screen readers) */} {hasError && ( Please enter a valid email address )}
``` ## WCAG 2.2 Form Requirements ### Critical Criteria | Criterion | Level | Requirement | Implementation | |-----------|-------|-------------|----------------| | 1.3.1 Info & Relationships | A | Structure conveyed programmatically | `