Skip to content
Live

Accessibility in Web Development

Build websites that work for everyone. A practical guide to WCAG compliance, semantic HTML, ARIA, keyboard navigation, and screen reader testing.

By Elena Marchetti9 min read

Accessibility Is Not Optional

Over 1 billion people worldwide have some form of disability. Inaccessible websites exclude them — and in many jurisdictions, that's also a legal liability. More importantly, it's just the right thing to do.

Semantic HTML First

The most powerful accessibility tool is already built into HTML:

<!-- Bad -->
<div class="button" onclick="submit()">Submit</div>

<!-- Good -->
<button type="submit">Submit</button>

Semantic elements communicate meaning to assistive technologies automatically.

ARIA When Needed

ARIA (Accessible Rich Internet Applications) fills gaps where HTML semantics fall short:

<!-- Loading state -->
<button aria-busy="true" aria-label="Saving...">
  <span aria-hidden="true">⟳</span>
</button>

<!-- Expandable section -->
<button aria-expanded="false" aria-controls="menu">
  Menu
</button>
<ul id="menu" hidden>...</ul>

<!-- Live region for dynamic content -->
<div aria-live="polite" aria-atomic="true">
  3 results found
</div>

Keyboard Navigation

Every interactive element must be reachable and operable via keyboard:

/* Never remove focus outlines — style them instead */
:focus-visible {
  outline: 2px solid #f54300;
  outline-offset: 2px;
}

Color Contrast

WCAG AA requires:

  • Normal text: 4.5:1 contrast ratio
  • Large text (18px+): 3:1 contrast ratio
  • UI components: 3:1 against adjacent colors

Testing Checklist

  • Tab through the entire page — can you reach everything?
  • Turn on a screen reader (NVDA, VoiceOver) and navigate
  • Zoom to 200% — does the layout break?
  • Test with keyboard only — no mouse

Accessibility improvements benefit everyone: better keyboard shortcuts, clearer labels, faster load times. Build it in from the start.

Share

Written by

Elena Marchetti

Editor. Writes about language, localisation, and why the web still reads like it was built in one country.

css

Advanced Tailwind CSS Patterns

Go beyond utility classes. Learn Tailwind's plugin system, custom design tokens, component extraction, and the patterns that scale to large codebases.

Soren Lindqvist9 min read
css

CSS Grid: The Complete Guide

Master CSS Grid from first principles. Learn grid-template-areas, auto-placement, subgrid, and real-world layout patterns every developer needs.

Elena Marchetti10 min read
programming

How to Contribute to Open Source

Your first open source contribution doesn't have to be a major feature. A practical guide to finding projects, making meaningful contributions, and building your reputation.

Amara Osei7 min read