Accessibility is widely seen as extra work for a small group. It is not. Everyone benefits who has only one hand free, who looks at a display in bright sun, who no longer guides a mouse as steadily as at twenty, or who simply wants to skim a page quickly. Since 2025 binding requirements apply to many digital services in the EU as well, so the pressure comes from outside too.

The good news: most of it is not special technology but clean craft. Build properly from the start and the larger part is done.

Structure carries the largest part

A page does not become accessible by sprinkling attributes over it. It becomes accessible when the document has a structure that holds up without eyes.

  • Semantic HTML instead of nested containers. A <button> is a button, a <div> with a click handler is not.
  • Mark the regions, header, navigation, main content, footer. Screen readers jump straight to them.
  • One first level heading per page. Visually hidden if need be, but present.
  • Heading levels without gaps. Levels describe the outline, not the font size.
  • A meaningful page title in the form "Brand, page name", for example "chessmail, Lobby". It is the first thing announced.

Operation by keyboard

Everything that works with a mouse has to work with the keyboard. This is the test that brings clarity fastest: press Tab and walk through the page once.

  • Every control has to be reachable
  • The focus has to be visible, a ring of your own beats the removed default one
  • The order has to follow the visible arrangement
  • You have to get out of menus and dialogs again without reaching for the mouse
  • A skip link to the content saves tabbing through the navigation on every page

Labels

What a sighted person infers from the arrangement has to be in the text for a screen reader.

  • Form fields need an associated label, not just a placeholder inside the field
  • Links have to make sense on their own. "Click here" says nothing, "Price list as PDF" says everything
  • Icon-only buttons need a label, otherwise they are called "button"
  • Error messages have to appear as text, not only as a red outline

For the rest there are ARIA attributes, used with restraint:

<div role="dialog" aria-labelledby="dialog-title">
    <h2 id="dialog-title">Choose a file</h2>
    <button aria-label="Close" onclick="dialog.close()">X</button>
</div>

aria-labelledby points to the label, aria-describedby to a longer explanation, aria-label sets a label directly, in the language of the page. The rule of thumb: no ARIA beats wrong ARIA. A properly marked up HTML element needs none at all.

Images

The alternative text describes the purpose, not the appearance. For a product photo what is shown matters, for a chart the message, for a linked logo the destination of the link.

Purely decorative images get an empty alt attribute or aria-hidden="true" and disappear from the tree the screen reader reads out. That is not negligence but consideration: every needless announcement costs time.

Colour and contrast

  • Colour must never be the only carrier of information. A red field needs text as well
  • Body text needs enough contrast against the background, light grey on white often misses the minimum values
  • The same goes for controls and the focus ring, not only for text

You can use this tool for displaying the contrast ratio. It gives the ratio for two colours and the WCAG level that meets. The source is on GitHub.

Two techniques you need constantly

Content meant for screen readers only is not hidden with display: none, because that removes it for everyone. The usual way:

.visually-hidden {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

The other way round, aria-hidden="true" takes an element and its contents out of the accessibility tree without removing it visually. Good for icons, duplicated text and collapsed sections.

Checking your work

Automated tools are the first step and, in practice, find only a part of the problems, roughly everything a machine can decide on its own.

  • Lighthouse is built into Chrome and gives a first assessment
  • axe and WAVE check more specifically and explain their findings
  • Accessibility Insights also walks you through the steps that stay manual
  • The accessibility tree in Chrome's developer tools shows what assistive technology actually receives

The rest you hear. How that works is in the post Testing a website with VoiceOver, with the keyboard commands for headings, links, forms and tables.

The order that works

  1. Get the document structure and the headings right
  2. Operate the whole page once with the keyboard
  3. Add labels for fields, links and icon buttons
  4. Go through the alternative texts and hide the decorative images
  5. Measure the contrast
  6. Listen to it with a screen reader

In that order the most effective points are done first. Most sites do not fail on exotic ARIA patterns, they fail on missing headings and unlabelled fields.