Tutorial

Website accessibility basics

About one in six people lives with a significant disability. Accessibility means they can use your site too, and most accessibility fixes make the site better for everyone, including you on a cracked phone screen in bright sunlight.

The standard: WCAG and POUR

The Web Content Accessibility Guidelines (WCAG), published by the W3C, are the international standard. The current version is WCAG 2.2, and Level AA is the conformance target most organizations aim for. Everything in it hangs off four principles, remembered as POUR:

  • Perceivable: people can recognize the content, through whatever senses they have.
  • Operable: people can use the interface, however they navigate.
  • Understandable: people can understand the content and how the interface behaves.
  • Robust: the content works with current and future assistive technologies.

You don't need to memorize the full guidelines to start. The seven fixes below cover the issues automated checkers find most often.

Seven fixes with the biggest impact

FixWho it helps
Alt text on meaningful imagesBlind users with screen readers; also helps when images fail to load
Real labels on every form inputScreen reader users; also makes taps target the right field on mobile
Sufficient color contrastLow-vision users; everyone reading in sunlight
Keyboard-navigable everythingPeople who can't use a mouse; test by unplugging yours
Visible focus indicatorsKeyboard users need to see where they are; don't remove outlines without replacing them
Semantic HTMLScreen readers navigate by headings, landmarks, and lists; divs tell them nothing
Descriptive link text"Click here" means nothing out of context; "read our pricing" does

What automated checkers miss

Tools like Lighthouse and axe catch real issues, but only roughly a third to half of them. A checker can verify that alt text exists; it can't tell you the alt text says "image123.jpg." It can verify focus is visible; it can't tell you the tab order jumps illogically across the page. Run the automated scan, then do a manual pass: unplug your mouse, turn on a screen reader, and try to complete your site's main task.

Worked example: fixing a signup form

Take a common signup form with fields for a name, an email address, and a password. The only guidance inside each box is placeholder text, the grey hint that sits in the empty field. A visitor starts typing and the hint disappears, so anyone who forgets what the third box asked for has to clear it and start again. A screen reader may announce the placeholder as if it were a label, or skip it entirely, depending on the browser. The fixes below turn that form into one people can complete with confidence.

Add real labels that stay visible

Give every field a label element tied to the field through matching for and id values. The label stays on screen while the visitor types, clicking or tapping the label moves focus into the field, and a screen reader announces the label when the field receives focus. Keep the placeholder as a format hint inside the box, where it can help without carrying the whole job.

<label for="email">Email address</label>
<input id="email" name="email" type="email" placeholder="you@example.com">

Check the colors while you are here. Label text is normal size text, so at WCAG Level AA it needs a contrast ratio of at least 4.5:1 against its background. Large text has a lower bar of 3:1. Placeholder hints in pale grey fail the 4.5:1 ratio on most white forms, which is a second reason to give the naming job to a proper label in a darker color.

Set a focus order that follows the page

Keyboard visitors move through the form with the Tab key, in the order the fields appear in the code. Arrange the code so that order matches the order on screen: label and field pairs from top to bottom, ending at the submit button, with no positive tabindex values pulling a later field forward. Press Tab from the top of the page and watch the focus indicator travel. Every stop needs a visible outline or an equally clear style change, and the indicator itself needs 3:1 contrast against the colors next to it so people can see where they are. If focus ever lands somewhere invisible, or jumps from the first field to the button and back again, the order in the code needs correcting.

Tie each error message to its field

Submit the form with a mistake in it and watch what the current version does. Many forms answer with a single line at the top saying an error occurred, in red. A red border alone leaves some users guessing about which field failed and why. Place a written message beside each field that failed, connect it to the field with aria-describedby so a screen reader announces the message together with the label, and move focus to the first field that needs fixing. Write the message as an instruction the visitor can act on. Under the email field, "Enter an email address in the format name@example.com" tells the visitor what to type. Error text is normal text for contrast purposes, so it also has to meet the 4.5:1 ratio, and the wording has to carry the meaning for anyone who cannot perceive the color change.

Test the fixed form with a keyboard only

  1. Put the mouse aside and Tab from the top of the page until you reach the first field, counting the stops on the way.
  2. Type a name, an email address, and a password using the keyboard alone, and confirm the label for each field is visible while you type.
  3. Submit with an empty field on purpose and confirm focus moves to that field and its error message makes sense on its own.
  4. Correct the entry, submit again with the Enter key, and confirm the success message appears where keyboard focus and screen readers can reach it.
  5. Tab past the button and Shift Tab back again to confirm focus never gets trapped or lost inside the form.

Run the same test again after any redesign of the form. Labels, order, and error handling break quietly when a new theme or a new form tool arrives, and a five minute keyboard pass catches the break before your visitors do.

Frequently asked questions

Is accessibility legally required?

It depends on your country and sector; many laws reference WCAG directly. But treat the legal question as secondary: the business case (more users, better SEO, fewer lawsuits) stands on its own.

Does accessible design look boring?

No. Accessibility constrains contrast, sizing, and structure, not aesthetics. Some of the best-designed sites on the web are also the most accessible.

Where do I start on an existing site?

Run an automated scan for the quick wins (contrast, labels, alt text), then keyboard-test your three most important user flows. Fix what blocks those flows first.

Last verified: October 27, 2026, against the W3C WCAG 2.2 standard. WCAG 2.2 is the current W3C Recommendation; check the W3C for any newer version.

Want an accessible site from the start?

We build to WCAG 2.2 Level AA: semantic markup, keyboard support, and real contrast.

Get a quote →

← All tutorials