Accessibility (often written "a11y") means building pages that people with disabilities can use — via screen readers, keyboard-only navigation, magnification and more. It's a legal requirement in many places, improves SEO, and is simply the right thing to do. The good news: most of it is just using HTML correctly.
Why accessibility?
Around 15% of people live with a disability. An inaccessible page shuts them out — and the same fixes (clear structure, captions, good contrast) help everyone on a small screen, a slow connection or in bright sunlight.
Semantic HTML first
Alt text & labels
- Every meaningful
<img>needsaltthat describes what it communicates; decorative images usealt="". - Every form control needs a
<label>(Chapter 9). - Link and button text must make sense out of context — "Download syllabus", not "click here".
Keyboard & focus
Many people navigate by keyboard alone (Tab to move, Enter/Space to activate). Interactive elements must be reachable and show a visible focus indicator:
- Use native interactive elements (
a,button,input) — they're keyboard-operable by default. - Never remove the focus outline (
outline: none) without replacing it — keyboard users rely on it to see where they are. - A "skip to content" link at the top lets keyboard users bypass the nav.
ARIA
ARIA attributes add accessibility information when native HTML can't express it — custom widgets, dynamic updates. Use it sparingly and correctly:
<button aria-label="Close" aria-expanded="false">✕</button><!-- Announce dynamic changes to screen readers --><div role="status" aria-live="polite">Saved!</div><nav aria-label="Primary">…</nav> <!-- distinguish multiple navs -->
Practice
Audit a page: does every image have appropriate alt? Can you reach every link and button with Tab and see a focus ring? Do icon-only buttons have aria-labels? Fix each gap using native elements first, ARIA only where needed.
Key takeaways
- 01Accessibility means everyone can use your page — a legal, SEO and ethical win.
- 02Use semantic native elements first; a real <button> is accessible for free.
- 03Provide alt text, labelled controls, and link/button text that makes sense out of context.
- 04Support keyboard navigation and never remove the focus outline without replacing it.
- 05Use ARIA only to fill gaps native HTML can't (custom widgets, live regions, aria-label).
