A09

Warning

Accessibility

A09 — Media nobody can follow without sound

A Video with no controls, or a Video or Audio with no captions: or transcript:.

What the compiler said

warning[A09]: Video missing "captions" --> src/App.wf:3:5 | 3 | Video(src: "/demo.mp4").controls | ^^^^^ = help: Add captions: Video(src: "...", captions: "/captions.en.vtt") = docs: https://webfluent.monzeromer.dev/errors/A09

The fix

Broken

wf

page P(path: "/", title: "T", description: "D") { Heading("Demo").h1 Video(src: "/demo.mp4").controls }

Fixed

wf

page P(path: "/", title: "T", description: "D") { Heading("Demo").h1 Video(src: "/demo.mp4", captions: "/demo.en.vtt").controls }

Video(src: …, captions: "/demo.en.vtt").controls; an Audio takes transcript:.

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