# Accessibility Standards **WCAG 2.1 Level AA compliance patterns and best practices** ## Core Principles ### 1. Perceivable - Provide text alternatives for non-text content - Provide captions and transcripts for multimedia - Create content that can be presented in different ways - Make it easier for users to see and hear content ### 2. Operable - Make all functionality available from keyboard - Give users enough time to read and use content - Do not design content that causes seizures - Help users navigate and find content ### 3. Understandable - Make text readable and understandable - Make content appear and operate in predictable ways - Help users avoid and correct mistakes ### 4. Robust - Maximize compatibility with current and future tools ## Implementation Patterns ### Semantic HTML ```html
Click me
``` ### ARIA Labels ```html ``` ### Keyboard Navigation - Tab order should be logical - Focus indicators must be visible - All interactive elements accessible via keyboard - Escape key closes modals/menus ### Color Contrast - Normal text: 4.5:1 minimum - Large text (18pt+): 3:1 minimum - Interactive elements: 3:1 minimum ### Screen Reader Support - Use proper heading hierarchy (h1-h6) - Provide skip links - Label form inputs properly - Use live regions for dynamic content ## Testing Tools - axe DevTools - Pa11y - Lighthouse - NVDA/JAWS screen readers - Keyboard-only navigation testing ## Common Patterns ### Accessible Forms ```tsx {error && ( {error} )} ``` ### Accessible Modals ```tsx

Modal Title

{/* Trap focus within modal */} {/* Close on Escape */}
``` ### Accessible Tables ```html
Monthly Sales Data
Month Sales
January 0,000
``` ## Checklist - [ ] Keyboard navigation works - [ ] Screen reader announces content properly - [ ] Color contrast meets requirements - [ ] Focus indicators visible - [ ] Form labels present and associated - [ ] Headings in logical order - [ ] Alternative text for images - [ ] ARIA used correctly (not overused) - [ ] Error messages clear and accessible - [ ] No keyboard traps