How to fix: “<video> elements must have captions”
Videos with no captions, explained in plain English, with the exact fix and code you can copy.
- Scanner rule:
video-caption- Standard:
- WCAG 1.2.2 Captions (Prerecorded) (Level A)
What this error means
A video with speech needs captions, which are synchronized text of what is said and of important sounds. Axe flags a <video> element that has no captions track. Captions are also useful to hearing visitors who watch with the sound off, which is common on phones.
Who it affects
Deaf and hard-of-hearing visitors, people in noisy or quiet places, and viewers whose first language is not the one spoken in the video.
Where it usually hides
- Welcome and promotional videos on home pages
- Product demos and tutorials
- Background videos that include speech
How to fix it
- Create a caption file (WebVTT, .vtt). Many video tools, and free services, can generate a first draft from the audio.
- Read the draft and correct names, jargon and mistakes. Automatic captions are not accurate enough to publish unchecked.
- Add the file to the video with a <track kind="captions"> element.
- If you host the video on YouTube or Vimeo, upload or edit captions there and use their embed. The captions then travel with the video.
- A video with no speech, such as a silent loop, does not need captions, but it may need a text description of what it shows.
Before and after
Before
<video src="/media/welcome.mp4" controls></video>No captions.
After
<video src="/media/welcome.mp4" controls>
<track kind="captions" src="/media/welcome.en.vtt" srclang="en" label="English">
</video>A captions track the viewer can switch on.
Common mistakes
- Publishing automatic captions without reviewing them.
- Adding captions only to the YouTube version while a copy of the video on your own page has none.
How to check your fix
- Re-run a scan to confirm the flagged video is fixed.
- Play the video and switch captions on. Check that they match the speech.
Is this on your site?
Run a free scan and see every page and element affected. No account needed.
Questions people ask
Does a YouTube embed need a track element?
No. Axe checks <video> elements. For YouTube or Vimeo embeds, the captions are managed on that platform, and you should still check that they are turned on and accurate.
Keep reading
- Embedded frames with no title: Frames must have an accessible name
- Images with no alt text: Images must have alternative text
- Buttons with no label: Buttons must have discernible text
Automated scans catch only part of what WCAG covers, and fixing a scan result is not a legal guarantee of compliance. Last reviewed November 16, 2026.