Skip to content

Lesson 2 of 9 · 20m

Document Structure: Landmarks, Headings, and Reading Order

How assistive technology consumes page structure, why heading levels are navigation rather than typography, and how DOM order becomes user experience.

A sighted user scans a page visually. A screen-reader user often scans it structurally: jump to main, list headings, list links, move through landmarks. If your structure is decorative rather than truthful, you have removed the map and left only the terrain.

Headings are an outline

<h1>Account security</h1>
<section>
  <h2>Password</h2>
  <h3>Reset policy</h3>
</section>
<section>
  <h2>Passkeys</h2>
</section>

Do not pick h4 because the design wants small text. Pick the level that represents nesting and use CSS for size. Skipping levels is sometimes harmless in a tiny component, but a page whose outline jumps from h1 to h5 usually means content was arranged by appearance.

Landmarks need names when repeated

One navigation region can be nav; three of them need labels:

<nav aria-label="Primary">...</nav>
<nav aria-label="Breadcrumb">...</nav>
<nav aria-label="Section">...</nav>

aria-label does not change visuals. It disambiguates landmarks in the screen-reader rotor or elements list. Use main once. Do not wrap everything in section; a section without a useful heading is often just a div with extra ceremony.

DOM order is interaction order

Keyboard and screen-reader users experience the page in source order, not visual order. CSS grid and flexbox can rearrange visually:

.actions {
  display: flex;
  flex-direction: row-reverse;
}

That may put the primary action first visually while it remains last in the keyboard order. Sometimes that is correct; often it is disorienting. Check both orders deliberately.

Write the outline before the layout

A useful exercise: paste your markup into a headings viewer or use a browser accessibility tree inspector. If the outline reads like a table of contents somebody can navigate, the page is probably structured well. If it reads like Checkout, div, empty, TOTAL, you found the problem.

Field notes

  • One clear h1 per page is still the simplest convention for document-oriented screens.
  • Repeated landmarks need distinct accessible names.
  • aria-hidden="true" on focusable content creates a black hole; hidden means hidden to everyone.
  • Screen readers generally do not announce raw DOM structure unless semantics exist to announce.

Was this lesson helpful?

Sign in to rate