217 lines
6.1 KiB
Markdown
217 lines
6.1 KiB
Markdown
|
|
# Accessibility Checklist
|
||
|
|
|
||
|
|
This document provides a checklist for ensuring accessibility compliance across the Timeline application.
|
||
|
|
|
||
|
|
## General Principles
|
||
|
|
|
||
|
|
- ✅ All interactive elements are keyboard accessible
|
||
|
|
- ✅ Focus indicators are visible for keyboard navigation
|
||
|
|
- ✅ Color is not the only means of conveying information
|
||
|
|
- ✅ Text has sufficient contrast ratio (WCAG AA: 4.5:1 for normal text, 3:1 for large text)
|
||
|
|
- ✅ Touch targets are at least 44x44px
|
||
|
|
- ✅ Content is responsive and works on mobile devices
|
||
|
|
|
||
|
|
## Semantic HTML
|
||
|
|
|
||
|
|
- ✅ Use semantic HTML elements (`<nav>`, `<main>`, `<article>`, `<section>`, etc.)
|
||
|
|
- ✅ Headings follow logical hierarchy (h1 → h2 → h3)
|
||
|
|
- ✅ Lists use proper list markup (`<ul>`, `<ol>`, `<li>`)
|
||
|
|
- ✅ Forms use proper form elements with labels
|
||
|
|
- ✅ Buttons use `<button>` element (not `<div>` with click handlers)
|
||
|
|
- ✅ Links use `<a>` element with proper href
|
||
|
|
|
||
|
|
## ARIA Attributes
|
||
|
|
|
||
|
|
### Required ARIA Labels
|
||
|
|
|
||
|
|
- ✅ Interactive elements without visible text have `aria-label`
|
||
|
|
- ✅ Icon buttons have descriptive `aria-label`
|
||
|
|
- ✅ Form inputs have associated labels or `aria-label`
|
||
|
|
- ✅ Landmarks have `aria-label` when multiple of same type exist
|
||
|
|
|
||
|
|
### ARIA States
|
||
|
|
|
||
|
|
- ✅ Expandable elements use `aria-expanded`
|
||
|
|
- ✅ Selected items use `aria-selected`
|
||
|
|
- ✅ Checked items use `aria-checked`
|
||
|
|
- ✅ Disabled elements use `aria-disabled`
|
||
|
|
- ✅ Loading states use `aria-busy`
|
||
|
|
- ✅ Hidden content uses `aria-hidden`
|
||
|
|
|
||
|
|
### ARIA Roles
|
||
|
|
|
||
|
|
- ✅ Custom widgets have appropriate roles
|
||
|
|
- ✅ Live regions use `aria-live` for dynamic content
|
||
|
|
- ✅ Dialogs use `role="dialog"` and `aria-modal="true"`
|
||
|
|
- ✅ Alerts use `role="alert"` or `aria-live="assertive"`
|
||
|
|
|
||
|
|
## Keyboard Navigation
|
||
|
|
|
||
|
|
### Focus Management
|
||
|
|
|
||
|
|
- ✅ Focus order follows logical reading order
|
||
|
|
- ✅ Focus is trapped in modals/dialogs
|
||
|
|
- ✅ Focus returns to trigger element when modal closes
|
||
|
|
- ✅ Skip links provided for main content
|
||
|
|
- ✅ No keyboard traps (user can always navigate away)
|
||
|
|
|
||
|
|
### Keyboard Shortcuts
|
||
|
|
|
||
|
|
- ✅ Enter/Space activates buttons and links
|
||
|
|
- ✅ Escape closes modals and dropdowns
|
||
|
|
- ✅ Arrow keys navigate lists and menus
|
||
|
|
- ✅ Tab/Shift+Tab moves between focusable elements
|
||
|
|
- ✅ Home/End navigate to first/last item in lists
|
||
|
|
|
||
|
|
## Forms
|
||
|
|
|
||
|
|
- ✅ All inputs have associated labels
|
||
|
|
- ✅ Required fields are marked with `required` attribute
|
||
|
|
- ✅ Error messages are associated with inputs using `aria-describedby`
|
||
|
|
- ✅ Form validation provides clear error messages
|
||
|
|
- ✅ Success messages are announced to screen readers
|
||
|
|
- ✅ Placeholder text is not used as labels
|
||
|
|
|
||
|
|
## Images
|
||
|
|
|
||
|
|
- ✅ All images have `alt` text
|
||
|
|
- ✅ Decorative images have empty `alt=""` or `aria-hidden="true"`
|
||
|
|
- ✅ Complex images have detailed descriptions
|
||
|
|
- ✅ Icons have text alternatives or `aria-label`
|
||
|
|
|
||
|
|
## Media
|
||
|
|
|
||
|
|
- ✅ Videos have captions/subtitles
|
||
|
|
- ✅ Audio content has transcripts
|
||
|
|
- ✅ Auto-playing media can be paused
|
||
|
|
- ✅ Media controls are keyboard accessible
|
||
|
|
|
||
|
|
## Color and Contrast
|
||
|
|
|
||
|
|
- ✅ Text contrast meets WCAG AA standards (4.5:1)
|
||
|
|
- ✅ Large text contrast meets WCAG AA standards (3:1)
|
||
|
|
- ✅ UI components have sufficient contrast (3:1)
|
||
|
|
- ✅ Focus indicators have sufficient contrast
|
||
|
|
- ✅ Information is not conveyed by color alone
|
||
|
|
|
||
|
|
## Responsive Design
|
||
|
|
|
||
|
|
### Mobile (< 768px)
|
||
|
|
|
||
|
|
- ✅ Content is readable without horizontal scrolling
|
||
|
|
- ✅ Touch targets are at least 44x44px
|
||
|
|
- ✅ Text is at least 16px to prevent zoom on iOS
|
||
|
|
- ✅ Navigation is accessible on mobile
|
||
|
|
- ✅ Forms are easy to complete on mobile
|
||
|
|
|
||
|
|
### Tablet (768px - 1024px)
|
||
|
|
|
||
|
|
- ✅ Layout adapts appropriately
|
||
|
|
- ✅ Touch and mouse interactions both work
|
||
|
|
- ✅ Content is readable and usable
|
||
|
|
|
||
|
|
### Desktop (> 1024px)
|
||
|
|
|
||
|
|
- ✅ Layout uses available space effectively
|
||
|
|
- ✅ Keyboard navigation works smoothly
|
||
|
|
- ✅ Hover states are visible
|
||
|
|
|
||
|
|
## Motion and Animation
|
||
|
|
|
||
|
|
- ✅ Animations respect `prefers-reduced-motion`
|
||
|
|
- ✅ Auto-playing animations can be paused
|
||
|
|
- ✅ Animations don't cause seizures (no flashing > 3 times/second)
|
||
|
|
- ✅ Parallax effects have alternatives
|
||
|
|
|
||
|
|
## Screen Reader Testing
|
||
|
|
|
||
|
|
### Test with:
|
||
|
|
|
||
|
|
- ✅ NVDA (Windows)
|
||
|
|
- ✅ JAWS (Windows)
|
||
|
|
- ✅ VoiceOver (macOS/iOS)
|
||
|
|
- ✅ TalkBack (Android)
|
||
|
|
|
||
|
|
### Verify:
|
||
|
|
|
||
|
|
- ✅ All content is announced
|
||
|
|
- ✅ Navigation is logical
|
||
|
|
- ✅ Form labels are read correctly
|
||
|
|
- ✅ Error messages are announced
|
||
|
|
- ✅ Dynamic content updates are announced
|
||
|
|
- ✅ Images have meaningful descriptions
|
||
|
|
|
||
|
|
## Component-Specific Checks
|
||
|
|
|
||
|
|
### Albums
|
||
|
|
|
||
|
|
- ✅ Album cards have descriptive labels
|
||
|
|
- ✅ Photo grid is keyboard navigable
|
||
|
|
- ✅ Drag-and-drop has keyboard alternative
|
||
|
|
- ✅ Delete confirmations are accessible
|
||
|
|
|
||
|
|
### Comments
|
||
|
|
|
||
|
|
- ✅ Comment form has proper labels
|
||
|
|
- ✅ Character counter is announced
|
||
|
|
- ✅ Submit button is keyboard accessible
|
||
|
|
- ✅ Edit/delete buttons have clear labels
|
||
|
|
- ✅ New comments are announced
|
||
|
|
|
||
|
|
### Reactions
|
||
|
|
|
||
|
|
- ✅ Reaction buttons have descriptive labels
|
||
|
|
- ✅ Current user reaction is indicated
|
||
|
|
- ✅ Reaction counts are announced
|
||
|
|
- ✅ Reaction picker is keyboard accessible
|
||
|
|
|
||
|
|
### Statistics
|
||
|
|
|
||
|
|
- ✅ Charts have text alternatives
|
||
|
|
- ✅ Data tables are properly structured
|
||
|
|
- ✅ Trends are described in text
|
||
|
|
|
||
|
|
### Theme Customizer
|
||
|
|
|
||
|
|
- ✅ Theme options are keyboard accessible
|
||
|
|
- ✅ Color picker has keyboard support
|
||
|
|
- ✅ Preview updates are announced
|
||
|
|
|
||
|
|
### Profile Editor
|
||
|
|
|
||
|
|
- ✅ Cover photo upload is keyboard accessible
|
||
|
|
- ✅ Crop tool has keyboard controls
|
||
|
|
- ✅ Custom fields are properly labeled
|
||
|
|
- ✅ Visibility toggles are clear
|
||
|
|
|
||
|
|
## Testing Tools
|
||
|
|
|
||
|
|
### Automated Testing
|
||
|
|
|
||
|
|
- ✅ axe DevTools
|
||
|
|
- ✅ WAVE
|
||
|
|
- ✅ Lighthouse Accessibility Audit
|
||
|
|
- ✅ Pa11y
|
||
|
|
|
||
|
|
### Manual Testing
|
||
|
|
|
||
|
|
- ✅ Keyboard-only navigation
|
||
|
|
- ✅ Screen reader testing
|
||
|
|
- ✅ Zoom to 200%
|
||
|
|
- ✅ High contrast mode
|
||
|
|
- ✅ Color blindness simulation
|
||
|
|
|
||
|
|
## Resources
|
||
|
|
|
||
|
|
- [WCAG 2.1 Guidelines](https://www.w3.org/WAI/WCAG21/quickref/)
|
||
|
|
- [Ant Design Accessibility](https://ant.design/docs/spec/accessibility)
|
||
|
|
- [MDN Accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility)
|
||
|
|
- [WebAIM](https://webaim.org/)
|
||
|
|
|
||
|
|
## Notes
|
||
|
|
|
||
|
|
- This checklist is based on WCAG 2.1 Level AA standards
|
||
|
|
- Regular accessibility audits should be conducted
|
||
|
|
- User testing with people with disabilities is recommended
|
||
|
|
- Accessibility is an ongoing process, not a one-time task
|