Captions for video elements

Last updated:

How to fix this issue?

Add a <track> element with kind="captions" to the <video> element:

<video controls>
  <source src="interview.mp4" type="video/mp4" />
  <track
    kind="captions"
    src="interview.vtt"
    srclang="en"
    label="English captions"
    default
  />
</video>

The caption file (.vtt or .srt) must include:

  • All spoken dialogue
  • Speaker identification where multiple speakers are present
  • Relevant non-speech audio (applause, alarms, music)

If the video is silent or audio-free, add aria-label to indicate it has no audio:

<video controls aria-label="Screen recording without audio">
  <source src="demo.mp4" type="video/mp4" />
</video>

Why is this important?

Captions make video content accessible to people who are deaf or hard of hearing. They also benefit users in noisy environments, users watching without headphones, and people learning the language. Without captions, a significant portion of users cannot access the information conveyed through audio.

More info:

WCAG 1.2.2 Captions (Prerecorded).

Rule info

Standard

WCAG A SC 1.2.2

Regulations

Section 508 EN 301 549 RGAA EAA ADA AODA

User impact

Fix complexity

Affects

Was this article helpful?

Checkout the ExcellentWebCheck services

ExcellentWebCheck's goal is to improve the online user experience. The tools of ExcellentWebCheck help to detect and improve usability problems on your website.