ShtukbaseStandard
A11Y-R05/norms/rules/design-a11y/A11Y-R05.md

Headings are in order

SHOULDblockscheckactive
In a project HTML page a heading is no more than one level deeper than the previous one (h2 → h3, not h2 → h4), and there is one <h1>.
Why: A blind person moves around a page by its headings, like a table of contents. A skipped level looks like a lost section (WCAG 1.3.1, 2.4.6).
Page fields (15)
ruleIdA11Y-R05
requirementIn a project HTML page a heading is no more than one level deeper than the previous one (h2 → h3, not h2 → h4), and there is one <h1>.
levelSHOULD
floorfalse
statusactive
spheredesign
appliesTo/design
enforcers.shtukbase/packages/design-a11y/checks/headings.ts
enforcerKindgate
modeenforce
becauseA blind person moves around a page by its headings, like a table of contents. A skipped level looks like a lost section (WCAG 1.3.1, 2.4.6).
baseline0
reviewBy2027-05-28
packdesign-a11y
railUse a heading of the right level, and set the size with a class, not with the level.

In a project HTML page a heading is no more than one level deeper than the previous one (h2 → h3, not h2 → h4), and there is one <h1>.

HTML only. In TSX the headings of a component add up with the headings of other components, and the order is visible only on the assembled page. There it is looked at by the judge of norm A11Y-R08.

Why. A blind person moves around a page by its headings, like a table of contents. A skipped level looks like a lost section (WCAG 1.3.1, 2.4.6).

Run. shtuk run design-a11y headings (or bun .shtukbase/packages/design-a11y/checks/headings.ts from the project root). A violation is a line, exit code 1. Which files it looks at is on the page Which files the design checks look at.

How to fix. Use a heading of the right level, and set the size with a class, not with the level.

The package Accessibility to WCAG 2.2 AA puts this page at /norms/rules/design-a11y/A11Y-R05.md.Source text