Accessibility (a11y)
Purpose
Ensure web interfaces are usable by everyone, including people using assistive technologies.
POUR Principles (WCAG Foundation)
| Principle | Meaning | Key requirements |
|---|---|---|
| Perceivable | Can users perceive the content? | Alt text, captions, contrast, text resizing |
| Operable | Can users operate the interface? | Keyboard access, no time traps, skip navigation |
| Understandable | Can users understand the content? | Clear language, predictable behaviour, error help |
| Robust | Does it work with assistive tech? | Valid HTML, ARIA where needed, tested with screen readers |
Semantic HTML First
Use native HTML elements before reaching for ARIA:
<button>not<div onclick><nav>,<main>,<aside>for landmarks<h1>-<h6>in order for headings<label>withforattribute for form fields<table>with proper headers for tabular data
Rule: If a native element does the job, don't use ARIA. ARIA is a supplement, not a replacement.
Keyboard Navigation Essentials
- All interactive elements reachable via Tab
- Logical tab order (follows visual order)
- Visible focus indicators (never
outline: nonewithout replacement) - Escape closes modals/popups
- Arrow keys for widget navigation (menus, tabs, sliders)
Color and Contrast
- Text: minimum 4.5:1 ratio (AA), 3:1 for large text
- UI components: minimum 3:1 ratio
- Never convey information by color alone (use icons, text, patterns too)
ARIA Essentials
aria-label/aria-labelledbyfor elements without visible textaria-liveregions for dynamic content updatesroleonly when native semantics don't applyaria-expanded,aria-selected,aria-checkedfor state
Testing Approach
- Keyboard-only navigation (unplug mouse)
- Screen reader testing (VoiceOver, NVDA)
- Automated tools (axe-core, Lighthouse)
- Color contrast checker
- Zoom to 200% — layout should remain usable
Related Skills
frontend/knowledge-component-design— accessible component patternsreviewers/review-accessibility— structured accessibility review