Fix guides · Accessibility

How to add captions to videos (“<video> elements do not contain a captions track”)

Videos without captions shut out deaf and hard-of-hearing visitors, and anyone watching with the sound off. How to add them on Shopify, WordPress, Webflow, Wix, Squarespace and Next.js.

Time to fix
15–60 minutes per video
Skill needed
No code
Who notices
Deaf and hard-of-hearing visitors, and anyone watching muted

Why it matters

Captions show what's said and the sounds that matter, in sync with the video. Without them, deaf visitors miss everything spoken.

Many people watch with the sound off, on phones in public, so captions help far more people than you might expect.

This check looks at videos hosted on your own site (<video> elements). YouTube and Vimeo embeds have their own caption settings.

“If a video has no caption, deaf users have limited or no access to the information contained in it.”

Deque axe rule: video-caption (used by Lighthouse)

Before you start

  • Captions are usually a WebVTT (.vtt) file. Many video tools and AI transcription services generate one; always check it by hand.
  • Include who's speaking when it isn't obvious, and meaningful sounds such as [applause] or [music stops].
  • Background videos with no speech or meaningful sound don't need captions, but should be muted and easy to pause.

Fix it on your platform

Shopify

  1. Shopify's theme accessibility guidance asks for closed captions on videos.
  2. For videos in your theme's video sections, the simplest route is to host them on YouTube or Vimeo, add captions there, and use the embed option.
  3. For videos you host yourself, your theme code needs a <track> element pointing at your caption file.

WordPress

  1. Select the Video block, click Text tracks in the toolbar, and upload your .vtt caption file.
  2. After uploading, use the edit track option to check the track's settings.

Webflow

  1. Webflow's Video element embeds videos hosted on YouTube or Vimeo. Add captions on that platform and they're available in the player.
  2. For video files you host yourself, use an Embed element with your own <video> and a captions <track>.

Wix

  1. Wix recommends captions on all video content. Video hosts such as YouTube have a closed caption feature viewers can turn on.
  2. For videos you upload yourself, Wix suggests adding captions with external software such as Amara.

Squarespace

  1. Squarespace recommends adding synchronized captions through YouTube or Vimeo's closed-captioning features, so viewers can turn them on inside the video block.

Next.js

  1. Add a <track> with kind="captions" to every <video> with speech, and keep the .vtt file in /public.
video
<video controls src="/video/how-to-measure.mp4">
  <track kind="captions" src="/video/how-to-measure.en.vtt" srcLang="en" label="English" default />
</video>

Any other site

  1. Add a captions <track> to each <video>.
HTML
<video controls>
  <source src="how-to-measure.mp4" type="video/mp4">
  <track kind="captions" src="how-to-measure.en.vtt" srclang="en" label="English" default>
</video>

Check that it's fixed

  • Play the video and turn on captions (CC): they should appear in sync.
  • Re-run your StudioLNC audit: the issue should be gone.

Find every issue like this on your site

Free audit of performance, accessibility, SEO and security, with fixes for your platform.