Skip to content
Learn Measure Blog Case studies About
On this page
  • How the Lighthouse video caption audit fails
  • How to add captions to a video
  • Resources

<video> elements do not contain a <track> element with [kind="captions"]

May 2, 2019 — Updated Sep 19, 2019
Appears in: Accessibility audits
On this page
  • How the Lighthouse video caption audit fails
  • How to add captions to a video
  • Resources

Captions make video elements usable for deaf or hearing-impaired users, providing critical information such as who is talking, what they're saying, and other non-speech information.

How the Lighthouse video caption audit fails #

Lighthouse flags <video> elements that are missing a <track> element with the attribute kind="captions".

The Lighthouse Accessibility score is a weighted average of all the accessibility audits. See the Lighthouse accessibility scoring post for more information.

How to add captions to a video #

Add at least one track element to the video element with the kind="captions" attribute:

<video width="300" height="200">
<source src="marathonFinishLine.mp4" type="video/mp4">
<track src="captions_en.vtt" kind="captions" srclang="en" label="english_captions">
<track src="audio_desc_en.vtt" kind="descriptions" srclang="en" label="english_description">
<track src="captions_es.vtt" kind="captions" srclang="es" label="spanish_captions">
<track src="audio_desc_es.vtt" kind="descriptions" srclang="es" label="spanish_description">
</video>
The example above includes both captions for deaf users, and audio descriptions for visually impaired users. Audio descriptions provide context beyond dialog, such as scenery, facial expressions. See also <video> elements do not contain a <track> element with [kind="description"].

Resources #

  • Source code for <video> elements do not contain a <track> element with [kind="captions"] audit
  • <video> elements must have a <track> for captions (Deque University)
Last updated: Sep 19, 2019 — Improve article
Return to all articles
Share
subscribe

Contribute

  • File a bug
  • View source

Related content

  • developer.chrome.com
  • Chrome updates
  • Web Fundamentals
  • Case studies
  • Podcasts
  • Shows

Connect

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Terms & Privacy
  • Community Guidelines

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.