A07

Warning

Accessibility

A07 — An empty heading

A Heading with no text.

What the compiler said

warning[A07]: Heading has empty text content --> src/App.wf:3:5 | 3 | Heading("").h2 | ^^^^^^^ = help: Headings should have meaningful text = docs: https://webfluent.monzeromer.dev/errors/A07

The fix

Broken

wf

page P(path: "/", title: "T", description: "D") { Heading("Title").h1 Heading("").h2 }

Fixed

wf

page P(path: "/", title: "T", description: "D") { Heading("Title").h1 Heading("Details").h2 }

Give the heading text, or remove it; style text with style { } rather than an empty heading.

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": { "A07": "off" } // wf-allow(A07)