A17

Warning

Accessibility

A17 — A frame with no title

A Frame with no title:, which is its accessible name: a screen reader announces a frame by its title, and a frame without one as only a frame.

What the compiler said

warning[A17]: Frame missing "title" attribute --> src/App.wf:3:5 | 3 | Frame(src: "https://example.com/") | ^^^^^ = help: Say what it shows: Frame(src: "/preview/", title: "Preview") = docs: https://webfluent.monzeromer.dev/errors/A17

The fix

Broken

wf

page P(path: "/", title: "T", description: "D") { Heading("Preview").h1 Frame(src: "https://example.com/") }

Fixed

wf

page P(path: "/", title: "T", description: "D") { Heading("Preview").h1 Frame(src: "https://example.com/", title: "Example") }

Frame(src: "https://example.com/", title: "Example") — the title is how a screen reader announces it.

Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).

Why this rule exists

Warning.

lints may lower it:

"lints": { "A17": "off" } // wf-allow(A17)