Recipe: Screen-reader-friendly markup
Semantic HTML patterns that make your content navigable for assistive technology.
Ingredients
- Landmark regions:
<header>,<main>,<nav>,<footer> - Heading hierarchy: one
<h1>, nested<h2>–<h6> - Descriptive link text — never "click here"
aria-labelon icon-only controls- Skip-to-content link as first focusable element
Steps
- Audit your page structure.
Open DevTools Accessibility panel. Every visible region should have a role.
- Replace div soup with landmarks.
Screen readers can jump between landmarks. Use them intentionally.
- Add a skip link.
First tab stop jumps past navigation straight to
<main>. - Label every form control.
Pair
<label>withhtmlForor wrap the input.