liveBook · Manning

Caption

As explained in Architecting Accessibility

A caption that viewers can turn on or off and that represents dialogue and relevant audio information.

Closed captions let viewers turn video text on or off. They help people who are deaf or hard of hearing, and can also support viewers watching in a non-native language or those who benefit from added comprehension support. Unlike open captions, they are not permanently embedded in the video and may allow viewers to customize their appearance. section 3.4.2

Include the information viewers need to follow both speech and meaningful audio:

  • Spoken dialogue, speaker identification, and meaningful non-speech sounds, such as laughter or glass shattering. section 3.4.2
  • Review automatically generated captions for accuracy and meaning. section 3.4.2

For web video, a time-coded WebVTT file can be linked with a video element’s track element. The browser loads the file separately and displays its text at the corresponding timestamps. Use closed captions when possible; open captions are a fallback when user-controlled captions are not technically feasible or the playback context does not allow customization. section 3.4.2

<video controls src="/latest/podcast.webm">
  <track kind="captions" src="/latest/captions/podcast.vtt" srclang="en" />
</video>

A video element links a WebVTT caption file through a track element. section 3.4.2

WEBVTT
 
00:00:01.000 --> 00:00:04.000
Ive: Welcome to our weekly podcast. This always brings me joy!
 
00:00:05.000 --> 00:00:06.000
Jess: [Claps hand and laughs out loud]
 
00:00:07.000 --> 00:00:09.000
Jess: Hi, guys! And what a day to be recording this

Timed caption cues show speaker identification, dialogue, and a meaningful sound. section 3.4.2

How Architecting Accessibility covers it

How deep it goes
Specifies caption content and reviews, then demonstrates time-coded WebVTT linked through a video track element.
Examples
Uses a podcast video with timed dialogue, speaker labels, and a laughter cue.
What you can do after
Apply captions by linking a time-coded WebVTT file to a video with a track element.
How it connects
Connects captions with WebVTT, HTML video and track elements, open captions, and transcripts.

Also explained in

Compare how 4 books explain caption →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.