A06
Warning
Accessibility
A06 — A link with no text
A Link with no text.
What the compiler said
warning[A06]: Link has no text content --> src/App.wf:3:5 | 3 | Link(to: "/about") | ^^^^ = help: Add text: Link("About", to: "/about") = docs: https://webfluent.monzeromer.dev/errors/A06
Your editor offers this fix: Add aria-label: "About". wf fix --code A06 applies it to every place it fits.
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Links").h1
Link(to: "/about")
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Links").h1
Link("About us", to: "/about")
}
page About(path: "/about", title: "About", description: "D") {
Heading("About").h1
}
Give it text that names where it goes — not "click here".
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": { "A06": "off" }
// wf-allow(A06)