Web accessibility
Intermediate
10 min read
Build pages everyone can use — with a keyboard, a screen reader, zoom or low vision.
Why it matters
Many people use the web without a mouse or without seeing the screen, and accessibility is a legal requirement in many places. Most problems are cheap to avoid while building and expensive to fix later.
Where it fits
What you will learn
- Check a page with only the keyboard.
- Give every control an accessible name.
- Know what WCAG is and where to look up a rule.
Before you start
- HTML and CSS✓ Learned
The checks that find most problems
- Tab reaches every link, button and field, in a sensible order, and you can see where focus is.
-
Every button and field has a name: visible text, a
<label>, oraria-labelfor an icon-only button. - Text has enough contrast with its background, and colour is never the only signal.
- The page still works at 200% zoom.
-
Images that carry meaning have
alttext.
Example
<label for="email">Email</label>
<input id="email" type="email" autocomplete="email">
<button type="button" aria-label="Close dialog">×</button>
Tip: Native elements first, ARIA second. A real <button> is accessible by default; a <div role="button"> needs focus handling and key handling added by hand.
WCAG (Web Content Accessibility Guidelines) is the standard most laws refer to. Level AA is the usual target.
Official documentation and references
Guides
- MDN — Accessibility ↗ Official · MDN Web Docs
Specifications
- Web Content Accessibility Guidelines (WCAG) 2.2 ↗ Official · W3C
Learn next
- Frontend frameworks ›✓ Learned
Related topics
- HTML and CSS✓ Learned
- Frontend frameworks✓ Learned
Done with this topic?
Reviewed 2026-10-23. Links go to the official documentation unless marked otherwise.