THE GITHTML FIELD GUIDE

Keep caption tracks attached to HTML video examples

An HTML video's caption track is often a separate resource, so preserving the video alone may lose its captions. Check the track URL, language, kind, and actual playback controls. Captions should convey speech and relevant audio information in sync with the video; a nearby transcript remains useful but serves a different reading experience.

Understand the access barrier

A recording can play perfectly while its caption file is unavailable. That failure is easy to miss if the author checks only the image and sound. A language label also needs to identify the actual caption language rather than the interface language.

Use a deliberate document pattern

Keep the approved caption resource with the authorized media distribution and verify it in the intended player. Review technical terms and timing rather than trusting an automatic export. Do not promise that a single HTML reading file automatically includes separate media or tracks.

  1. Verify the caption resource independently from the video resource.
  2. Check language labels, timing, and meaningful non-speech information.
  3. Test caption selection and coverage throughout the recording in the target environment.
html
<video controls src="demo.mp4"><track kind="captions" src="demo-en.vtt" srclang="en" label="English"></video>

Check the actual reading experience

Enable captions, seek to the middle, and inspect the end. A valid opening cue does not establish complete coverage.

Diagnose captions as a separate dependency

Consider an exported demonstration with demo.mp4 and demo-en.vtt stored beside the HTML. Moving only the video and page leaves the caption track behind, even though playback still looks successful. Inspect the track request and the actual file contents rather than checking only whether the player displays a captions menu. An authentication page or missing-file response saved with a .vtt extension is not a valid caption resource.

Confirm that the track is labeled with its real language and appropriate kind. Captions convey spoken content and relevant audio information, such as a warning tone or a speaker change that matters; subtitles may serve a different translation-oriented purpose. Review technical identifiers, numbers, and negations manually. A caption that says enabled when the speaker said not enabled can reverse the lesson while appearing grammatically polished. Timing should make the text available alongside the event it explains.

Test selection and playback at several points, including after seeking and near the end. Look for missing sections, overlapping cues, unreadably brief display times, and captions covering important screen content. The default attribute can express a preference for initial selection, but player and user settings affect the actual experience, so verify rather than promise. For offline delivery, test the authorized media and caption resources with connectivity disabled; the HTML file alone does not prove either dependency was saved. Provide a nearby transcript for readers who prefer scanning or cannot use the player, while recognizing that it does not recreate synchronized caption access. Keep media and caption revisions paired when replacing the recording.

Sources and further reading

AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.

All accessible documentation guides →

Read as MarkdownAll guides

Keep caption tracks attached to HTML video examples · gitHtml