{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-video-captions-bf5b7bde44e3","title":"Provide captions for video content","summary":"Ensure all prerecorded video content with audio includes synchronized captions in WebVTT (`.vtt`) format using the HTML `<track kind='captions'>` element. Captions must include spoken dialogue, speaker identification, and non-speech audio for accessibility compliance with WCAG 2.1 SC 1.2.2 (Level AA).","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-video-captions-bf5b7bde44e3","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-video-captions-bf5b7bde44e3","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-video-captions-bf5b7bde44e3.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-video-captions-bf5b7bde44e3\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Before adding captions, validate that the video contains audio and that the `.vtt` file includes all spoken dialogue, speaker IDs, and descriptions of non-speech audio (e.g., '[music]'). For embedded videos (YouTube, Vimeo), ensure captions are enabled on the platform and accessible via the embed settings.","instructions":"---\nname: video-captions\ndescription: \"Use when applies to all `<video>` elements and third-party video embeds (YouTube, Vimeo) where the page owner controls the content. Prerecorded videos require `.vtt` caption files via `<track>`. For videos embedded via `<iframe>`, check that the video platform captions are enabled. Audio-only content requires transcripts instead (SC 1.2.1). Video-only content (no audio) requires a text alternative or audio description instead (SC 1.2.3).\"\nmetadata:\n  category: accessibility\n  priority: high\n  difficulty: intermediate\n  estimatedTime: \"30\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/accessibility\/video-captions\n---\n\n# Provide captions for video content\n\nApproximately 15% of adults have some degree of hearing loss. Captions are essential for deaf and hard-of-hearing users who cannot access audio content. They also benefit users in sound-sensitive environments (libraries, open offices), users watching without headphones in public, non-native speakers, and users with auditory processing disorders. WCAG SC 1.2.2 is a Level AA requirement \u2014 its absence is a legal compliance failure under the ADA, EN 301 549, and similar regulations worldwide.\n\n## Quick Reference\n\n- Prerecorded video with audio: synchronized captions required \u2014 WCAG 2.1 SC 1.2.2 (Level AA)\n- Live video with audio: real-time captions required \u2014 WCAG 2.1 SC 1.2.4 (Level AA)\n- Use `<track kind='captions'>` with a `.vtt` (WebVTT) file for HTML5 `<video>` elements\n- Captions must include all spoken dialogue, speaker identification, and relevant non-speech audio (music, sound effects)\n- Subtitles and captions are different: captions include non-speech audio; subtitles translate dialogue only\n\n## Check\n\nFind all `<video>` elements and video embeds (`<iframe>` from YouTube, Vimeo, etc.). For each `<video>` with audio: check for a `<track>` child element with `kind='captions'` and a valid `src` pointing to a `.vtt` file. Verify the `default` attribute is present on at least one track so captions are on by default (or document the UX reason they are off by default). For YouTube\/Vimeo embeds: check that the platform's caption toggle is accessible. Also check that the `.vtt` file exists and is valid (not empty, not just music notes).\n\n## Fix\n\nFor `<video>` elements without captions: (1) Create a WebVTT (`.vtt`) file containing synchronized caption text \u2014 include all spoken words, speaker IDs for multi-speaker content, and descriptions of relevant sounds (e.g., '[applause]', '[upbeat music]'). (2) Add `<track kind='captions' srclang='en' label='English' src='captions-en.vtt' default>` inside the `<video>` element. (3) For auto-generated captions (YouTube, AI tools): review and correct errors \u2014 auto-captions average 80% accuracy and often fail on proper nouns, technical terms, and accented speech. (4) For live streams: implement real-time captioning via a third-party captioning service or CART (Communication Access Realtime Translation).\n\n## Explain\n\nWCAG 2.1 SC 1.2.2 (Captions \u2014 Prerecorded, Level AA) requires synchronized text alternatives for all audio in prerecorded video content. Captions differ from subtitles: captions are intended for deaf\/hard-of-hearing viewers and must include non-speech information (sound effects, music), while subtitles translate dialogue for viewers who can hear but do not understand the language. The HTML `<track>` element with `kind='captions'` delivers WebVTT files that browsers render as synchronized on-screen text. The `kind='subtitles'` value is for translation only and does not satisfy SC 1.2.2 because browsers may omit non-speech annotations.\n\n## Code Review\n\nReview the rendered markup and interactive states that affect Provide captions for video content. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/accessibility\/video-captions\n","use_cases":["Add captions to HTML5 `<video>` elements using `.vtt` files","Enable captions for YouTube and Vimeo embedded videos","Create and validate WebVTT caption files for accessibility","Ensure captions are enabled by default for all video content"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/video-captions\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T06:06:38.000000Z","updated_at":"2026-11-24T07:12:47.000000Z","seo_title":"Provide captions for video content accessibility","seo_description":"Ensure all prerecorded video content with audio includes synchronized captions in WebVTT (`.vtt`) format using the HTML `<track kind='captions'>` element. Check and fix `","seo_keywords":["video captions accessibility","HTML5 video captions","WebVTT caption file","YouTube video captions","Vimeo captions accessibility"]}}