A page has two navigable structures, and screen reader users use both.
Landmarks are regions. Elements map to landmark roles (per ARIA in HTML): header → banner and footer → contentinfo when they're not inside article, aside, main, nav or section; nav → navigation; main → main; aside → complementary; search → search. A section or form becomes a region or form landmark only with an accessible name. When a page has two landmarks of the same type, such as primary and pagination nav, give each an aria-label so the list of landmarks can tell them apart.
Headings are the outline. HTML once specified an outline algorithm in which sectioning elements created nesting, so an h1 inside a section counted as a level-2 heading. Browsers never implemented it for assistive technology, and in July 2022 WHATWG replaced it (PR #7829). Now the standard defines the outline as "all headings in a document, in tree order", each at its own level: h2 is level 2 wherever it sits. The rules are that at least one heading should be level 1, and that each heading may go at most one level deeper than the one before it (h2 → h4 is non-conforming).
So in practice:
- One
h1for the page topic, thenh2,h3… following the structure. - Sectioning elements group content and can give landmarks; they don't change heading levels.
hgroupwraps a heading with subtitle paragraphs; only the heading enters the outline.
The standard now also defines headingoffset and headingreset attributes and a :heading pseudo-class for components that can't know their depth. CSS.supports("selector(:heading)") returned false in Chrome 155 and Firefox 158, and Chrome still exposed an h1 inside headingoffset="1" as level 1, so don't rely on them yet.