A12
Warning
Accessibility
A12 — A page without exactly one h1
A page with no h1, or more than one.
What the compiler said
warning[A12]: Page has no h1 heading --> src/App.wf:1:1 | 1 | page P(path: "/", title: "T", description: "D") { | ^^^^ = help: Add a main heading: Heading("Page Title").h1 = docs: https://webfluent.monzeromer.dev/errors/A12
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Section").h2
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Section").h1
}
One Heading(…).h1 per page, naming what the page is. A layout's h1 counts for the page it frames.
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": { "A12": "off" }
// wf-allow(A12)