# Accessibility Guidelines Reference (WCAG) ## Quick Compliance Checklist ### Level AA Requirements (Minimum Standard) - [ ] Color contrast 4.5:1 for normal text - [ ] Color contrast 3:1 for large text (18px+ or 14px bold) - [ ] Touch targets minimum 44×44px - [ ] All functionality available via keyboard - [ ] Visible focus indicators - [ ] No content flashes more than 3 times/second - [ ] Page has descriptive title - [ ] Link purpose clear from text - [ ] Form inputs have labels - [ ] Error messages are descriptive --- ## Color and Contrast ### Contrast Ratios | Element | Minimum Ratio | Enhanced (AAA) | | ------- | ------------- | -------------- | | Body text | 4.5:1 | 7:1 | | Large text (18px+) | 3:1 | 4.5:1 | | UI components | 3:1 | - | | Graphical objects | 3:1 | - | ### Color Independence Never use color as the only means of conveying information: ```text ✗ Error fields shown only in red ✓ Error fields with red border + error icon + text message ✗ Required fields marked only with red asterisk ✓ Required fields labeled "(required)" or with icon + tooltip ✗ Status shown only by color dots ✓ Status with color + icon + label text ``` ### Accessible Color Combinations **Safe text colors on backgrounds:** | Background | Text Color | Contrast | | ---------- | ---------- | -------- | | White (#FFFFFF) | Dark gray (#1F2937) | 15.5:1 ✓ | | Light gray (#F3F4F6) | Dark gray (#374151) | 10.9:1 ✓ | | Primary blue (#2563EB) | White (#FFFFFF) | 4.6:1 ✓ | | Dark (#111827) | White (#FFFFFF) | 18.1:1 ✓ | **Colors to avoid for text:** - Yellow on white (insufficient contrast) - Light gray on white - Orange on white (marginal at best) --- ## Keyboard Navigation ### Requirements 1. **All interactive elements** must be reachable via Tab key 2. **Logical tab order** following visual layout 3. **No keyboard traps** (user can always Tab away) 4. **Focus visible** at all times during keyboard navigation 5. **Skip links** to bypass repetitive navigation ### Focus Indicators ```css /* Example focus styles */ :focus { outline: 2px solid #2563EB; outline-offset: 2px; } :focus:not(:focus-visible) { outline: none; /* Hide for mouse users */ } :focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; } ``` ### Keyboard Shortcuts | Key | Expected Behavior | | --- | ----------------- | | Tab | Move to next interactive element | | Shift+Tab | Move to previous element | | Enter | Activate button/link | | Space | Activate button, toggle checkbox | | Escape | Close modal/dropdown | | Arrow keys | Navigate within components | --- ## Screen Reader Support ### Semantic HTML Elements Use appropriate elements for their purpose: | Purpose | Element | Not This | | ------- | ------- | -------- | | Navigation | `