A11
Warning
Accessibility
A11 — A skipped heading level
A heading level skipped — h2 straight to h4.
What the compiler said
warning[A11]: Heading level skips from h1 to h4 --> src/App.wf:3:5 | 3 | Heading("Deep").h4 | ^^^^^^^ = help: Use h2 instead, or add the missing intermediate headings = docs: https://webfluent.monzeromer.dev/errors/A11
Your editor offers this fix: Change to .h2. wf fix --code A11 applies it to every place it fits.
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Title").h1
Heading("Deep").h4
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Title").h1
Heading("Deep").h2
}
Use the next level down (h2 after h1). Size text with style { font-size }, not with the heading level.
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
lints may lower it:
"lints": { "A11": "off" }
// wf-allow(A11)