Accessibility (a11y)
Making websites usable by everyone, including people with disabilities. Means semantic HTML, keyboard navigation, screen-reader support, sufficient color contrast, and ARIA attributes. Accessibility is a legal requirement in many countries and a moral imperative.
- Every website, always.
- Public services and large-audience sites (legally required).
- Never — accessibility should always be considered.
Definition
Web accessibility (a11y) ensures people with visual, motor, cognitive, or auditory disabilities can use a site. Key practices: semantic HTML, ARIA roles/labels, keyboard operability, focus management, color contrast (WCAG AA/AAA), and text alternatives for media.
Why it exists
The web should work for everyone. Inaccessible sites exclude users and violate laws (ADA, WCAG). Accessibility also improves SEO and usability for all users.
How it works
Use semantic HTML (button, nav, main, article) so screen readers understand structure. Add ARIA for dynamic widgets. Ensure keyboard navigation works (tab order, focus visible). Maintain color contrast ratios. Test with screen readers (NVDA, VoiceOver) and automated tools (axe, Lighthouse).
Scaling limits
ARIA is complex and often misused ('no ARIA is better than bad ARIA'). Testing across assistive technologies is time-consuming. Dynamic SPAs need careful focus management.
Cost shape
Free to implement. The cost is developer education and testing effort.
Alternatives
- Ignore it — Excludes users and risks lawsuits — never do this.
Failure modes
- Non-semantic divs instead of buttons/links.
- Missing alt text.
- Keyboard traps or invisible focus.
- Low contrast text.