Module 2. Advanced testing · Lesson 19 of 41 · 11 min
Accessibility testing (a11y): WCAG without the pain
Contrast, keyboard, screen readers, forms and images — what to check and with which tools.
Accessibility is quality for everyone
Around 1.3 billion people worldwide live with some form of disability. Add a broken arm, bright sun on the screen, an old phone or a slow connection. An accessible interface is easier for everyone — and in the US, inaccessible websites draw thousands of ADA lawsuits a year, while the European Accessibility Act applies in the EU from June 2025.
WCAG in four principles (POUR)
- Perceivable — text can be read, images have alternatives.
- Operable — everything works from the keyboard.
- Understandable — errors are explained, behavior is predictable.
- Robust — works with assistive technologies.
Contrast
Light gray text on white is the most common accessibility defect. You can check it in seconds in DevTools or with any contrast checker.
Keyboard: a 5-minute test
- Put the mouse away.
- Walk through the key scenario using only Tab, Shift+Tab, Enter, Space, the arrow keys and Esc.
- Focus is always visible, the order is logical, there are no traps (a modal you can't get out of).
- Menus, dropdowns and dialogs open and close from the keyboard.
Forms
- Every field has a visible label, not just a placeholder.
- An error explains what's wrong and how to fix it, and is linked to the field.
- Color is never the only carrier of information: a red border plus an error message.
Images and media
- Meaningful images have
alttext; decorative ones have an emptyalt="". - Video needs captions; audio needs a transcript.
- Charts are duplicated by a table or text (as in this course).
Tools
Lighthouse and axe DevTools find roughly a third of the problems automatically. The rest are manual checks: the keyboard, a screen reader (NVDA or JAWS on Windows, VoiceOver on macOS/iOS, TalkBack on Android) and 200% zoom.
Add 3–5 accessibility checks to your checklist — it's the cheapest way not to forget them.
Key takeaways
- Normal text needs a contrast ratio of at least 4.5:1 under WCAG AA.
- The key scenario must be doable with the keyboard alone, with visible focus.
- Automated tools find only part of the problems — manual checks are required.
Check yourself
1. What's the minimum contrast for normal text under WCAG AA?
2. A field is labeled only with a placeholder. What's wrong?
3. Which of these is a manual accessibility check?