Skip to main content
Albero Academy

Accessibility (a11y)

Build pages everyone can use — semantic HTML first, then ARIA, alt text, keyboard support, focus and the WCAG basics.

Chapter 13HTML15 min readBeginner friendly
  • #HTML
  • #Accessibility
  • #ARIA

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> needs alt that describes what it communicates; decorative images use alt="".
  • 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:

ARIA where native HTML falls short
<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

  1. 01Accessibility means everyone can use your page — a legal, SEO and ethical win.
  2. 02Use semantic native elements first; a real <button> is accessible for free.
  3. 03Provide alt text, labelled controls, and link/button text that makes sense out of context.
  4. 04Support keyboard navigation and never remove the focus outline without replacing it.
  5. 05Use ARIA only to fill gaps native HTML can't (custom widgets, live regions, aria-label).