--- url: "https://www.w3.org/WAI/WCAG22/Techniques/html/H95" titulek: "H95: Using the track element to provide captions | WAI | W3C" h1: "Technique H95:Using the track element to provide captions" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 04:42:01" znaku: 4408 slov: 561 kodovani: "utf-8" sha256: "16ce3aa1feaf52d85571be8e34557a687a01367ec71d0af5aa004f5892950f3d" --- # Technique H95:Using the `track` element to provide captions ## About this Technique This technique relates to [1.2.2 Captions (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/captions-prerecorded) (**Sufficient** when used with [G87: Providing closed captions](../general/G87)). This technique applies to HTML. Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The objective of this technique is to use the HTML `track` element to specify a captions timed text track for a video element. Caption timed text tracks contain transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information, suitable for when sound is unavailable or not clearly audible. The `src` attribute of the `track` element is a URL that is the address of the text track data. The `kind` attribute of the `track` element indicates the kind of information in the timed text. captions text tracks provide a text version of dialogue and other sounds important to understanding the video. Subtitles contain only the dialogue. If other audio information is important to understanding the video, a subtitle track will not be sufficient to meet the success criterion. Note Some regions use the term "subtitle" for any visible text representation of the audio track. An author may mark up a timed text track in the language of the audio track as kind=subtitles, instead of kind=captions, and may include additional relevant audio information. It is not best practice to use subtitles in this situation, since it may confuse users who are trying to find captions, but such a timed text track would meet the requirements of [Success Criterion 1.2.2 Captions (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/captions-prerecorded). ## Examples ### Example 1: Captions in one language A `video` element for a video in the English language with an English caption track. The captions are provided in the WebVTT format. ``` ``` ### Example 2: Captions in multiple languages A `video` element for a video in the English language with an English caption track. The captions are provided in the WebVTT format. ``` ``` ## Related Resources *No endorsement implied.* - [HTML `track` element](https://html.spec.whatwg.org/multipage/media.html#the-track-element) - [Timed Text Markup Language](https://www.w3.org/TR/ttml/all/) - [IMSC Profiles](https://www.w3.org/TR/ttml-imsc/all/) . TTML Profiles for Internet Media Subtitles and Captions. - [imscJS library](https://github.com/sandflow/imscJS/) . imscJS is a JavaScript library for rendering IMSC 1.0.1 and IMSC 1.1 documents to HTML5. - [IMSC: subtitles and captioning for the web](https://developer.mozilla.org/en-US/docs/Related/IMSC) . IMSC documentation on Mozilla Developer Network. - [WebVTT: The Web Video Text Tracks Format](https://github.com/w3c/webvtt) - [Captionator Polyfill](http://captionatorjs.com/) ## Tests ### Procedure For each video element used to play a video: 1. Check that the video contains a `track` element of `kind` captions in the language of the video. ### Expected Results - Check #1 is true. ## Test Rules The following are Test Rules related to this Technique. It is not necessary to use these particular Test Rules to check for conformance with WCAG, but they are defined and approved test methods. For information on using Test Rules, see [Understanding Test Rules for WCAG Success Criteria](https://www.w3.org/WAI/WCAG22/Understanding/understanding-act-rules.html). - [Video element auditory content has accessible alternative](/WAI/standards-guidelines/act/rules/eac66b/proposed/) - [Video element auditory content has captions](/WAI/standards-guidelines/act/rules/f51b46/proposed/) Back to Top