Accessibility gets framed as a compliance chore. It's better understood as: does this work if someone can't see it, can't use a mouse, or is looking at it in bright sunlight with one hand on a train. That covers a lot more people than "disabled users" — including you, eventually.

Generated markup tends to be nearly accessible, and to fail in the same handful of ways.

Use the real elements

A <div> with a click handler is not a button. It can't be focused, can't be pressed with a keyboard, and isn't announced as a button. <button> gives you all of that for free.

Same for <a> for navigation, <label> tied to inputs, real headings in real order, <nav>, <main>, <ul> for lists. Every one of these is less code than the styled-div version and works better.

The five-minute test you can run now

Put your mouse down. Reload your page. Press Tab repeatedly.

  • Can you reach every interactive thing?
  • Can you always see where you are?
  • Does the order make sense?
  • Can you activate everything with Enter or Space?
  • If a menu or dialog opens, can you get out with Escape?

Most sites fail this in the first ten seconds, usually on a custom control or an invisible focus outline that somebody removed because it looked untidy.

Get an audit

a11y-audit.txt
Audit this for accessibility: <paste>

Check and fix:
- Divs and spans doing a button's or link's job.
- Heading levels — one h1, no skipped levels.
- Inputs without labels; images without meaningful alt.
- Focus styles that were removed and not replaced.
- Colour contrast below 4.5:1 for body text.
- Anything that updates without a page change and isn't announced.

For each: the line, why it matters, the fix. Then tell me what still
needs a human with a screen reader.

Alt text, quickly

Describe what the image conveys here, not what's in it. A decorative flourish gets alt="" — an empty alt is correct and meaningful, a missing alt is not. A chart's alt text is its conclusion.

Contrast is the one that affects everybody. Grey-on-grey placeholder text is unreadable outdoors for people with perfect vision.