Media and motion Rule

Videos must have captions video-caption

A video element with speech or meaningful sound needs captions: text that appears on screen in time with the audio. Add a track element with kind="captions" pointing at a WebVTT file. Captions are not only for deaf viewers; most people on a train watch with the sound off.

Websight reports this as <video> elements must have captions

Who it affects

Someone who is deaf watching the museum's exhibition tour sees the curator talking and pointing at objects, and has no idea what is being said.

Someone watching on a train with no headphones has the sound off. With captions they watch; without, they scroll past.

Someone whose first language is not English follows spoken English much more easily when they can read it at the same time.

Broken versus fixed

The broken markup is shown as code rather than rendered, because the effect is in how it is announced or handled, not how it looks.

Broken
<video src="tour.mp4" controls width="320"></video>

The player only shows a captions button if a track exists. Here there is none, so there is nothing to switch on.

Fixed
<video src="tour.mp4" controls width="320">
  <track kind="captions" src="tour.en.vtt" srclang="en" label="English" default>
</video>

The browser shows a captions button and draws the text from tour.en.vtt over the picture.

Test it by hand in two minutes

  1. Play the video with the sound muted. Can you follow what is said?
  2. Look for a CC or subtitles button on the player and turn it on. The words should match the speech and include sounds that matter.
  3. Right click the video, choose Inspect, and check for a track element with kind="captions". Open its src in a new tab: you should see WEBVTT on the first line.
  4. For embedded players such as YouTube, check the captions were uploaded or corrected, not auto-generated and left.

The fix

Before
<video src="tour.mp4" controls></video>
After
<video src="tour.mp4" controls>
  <track kind="captions" src="tour.en.vtt" srclang="en" label="English" default>
</video>

A WebVTT file starts with the line WEBVTT, then timestamps and text. Most editing tools export it. Captions include speech and relevant sound; subtitles are speech only.

Several languages

Before
<track kind="captions" src="tour.en.vtt" srclang="en">
After
<track kind="captions" src="tour.en.vtt" srclang="en" label="English" default>
<track kind="captions" src="tour.cy.vtt" srclang="cy" label="Cymraeg">

One track per language. The label is what appears in the player's menu.

Video with no sound

Before
<video src="timelapse.mp4" controls></video>
After
<video src="timelapse.mp4" controls aria-describedby="tl"></video>
<p id="tl">Time-lapse of the new gallery being built. This video has no sound.</p>

Captions make no sense for a silent video. Say it has no sound so nobody wonders if their speakers are broken. The scanner will still flag it; mark it as reviewed.

Common mistakes

  • Burning captions into the picture only; they cannot be resized, searched or turned off, and the scanner cannot see them.
  • Using kind="subtitles" when the track also describes sounds; the check looks for captions.
  • Uploading auto-generated captions without reading them.
  • Pointing the track at a file that returns a 404, which passes the scanner and fails the viewer.

WCAG criteria this rule maps to

axe-core tags this rule as WCAG 2.2 level A. It is one of the checks for:

The scanner checks each video element for a track with kind="captions". It cannot load the file, check it is in sync, or tell whether the video has any speech to caption. Embedded players inside iframes are not checked at all. Automated tools find only part of the accessibility problems on a page; a pass on this rule is not a pass on the criterion.

Scan your own page for this and 63 other checks

Open any page in Chrome, click Websight, and get a score out of 100 with every issue explained and a draft fix snippet per element.

Add Websight to Chrome

Free scans, no account, nothing leaves your computer. Automated tools find only part of the problems; the extension says so on every report.