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)
| ruleId | A11Y-R05 |
| requirement | 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>. |
| level | SHOULD |
| floor | false |
| status | active |
| sphere | design |
| appliesTo | /design |
| enforcers | .shtukbase/packages/design-a11y/checks/headings.ts |
| enforcerKind | gate |
| mode | enforce |
| because | 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). |
| baseline | 0 |
| reviewBy | 2027-05-28 |
| pack | design-a11y |
| rail | Use 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.