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

Videos include captions for users who are deaf or hard of hearing.

On this page

Impact

ScanGov impact ratings

About

When a video provides a caption it is easier for deaf and hearing impaired users to access its information.

Risks

Users who are deaf cannot access video content.

Why it's important

Provides alternative ways to access media content for users who are deaf or hard of hearing.

User stories

As a user who is deaf or hard of hearing, I want captions on video content so that I can understand the information being presented.

Code

Failing pattern:

<!-- Fail: video with no captions -->
<video src="presentation.mp4" controls></video>

Passing pattern:

<!-- Pass: captions track attached -->
<video controls>
  <source src="presentation.mp4" type="video/mp4">
  <track kind="captions" src="captions-en.vtt" srclang="en" label="English" default>
</video>

Error

ScanGov messaging when a site fails a standard:

Failed: <video> elements contain a <track> element with [kind="captions"]

Guidance

Indicators

On this page