slop audit
Blog post 68 / Accessibility and semantics

Video accessibility: captions, controls, and launch tests

Check video accessibility before launch: add HTML captions and transcripts, test player controls, diagnose missing tracks, and keep focused regression checks.

By Slop Audit · 8 min read

Video accessibility means people can understand your recording and operate its player without depending on hearing, sight, or a mouse alone. A portfolio walkthrough or product demo can load successfully while its captions are missing, its controls are unreachable, or an important command appears only on screen.

Before sharing the public page, review the recording, its text alternatives, and the deployed player together. This guide uses a prerecorded, self-hosted software demo with spoken narration. Live streams, audio-only recordings, and third-party players need their own content and implementation review.

Video accessibility launch checklist

  1. Identify information conveyed through speech, sounds, and visuals.
  2. Publish synchronized captions reviewed against the final recording.
  3. Provide a nearby transcript and describe important visual information.
  4. Use a player with usable keyboard and assistive-technology support.
  5. Verify caption files load and parse on the deployed origin.
  6. Test playback, captions, seeking, and fullscreen on supported devices.
  7. Retest the media after replacing the video or changing the player.
  8. Audit the surrounding public page and keep the media review with it.

Start with a content inventory: recording URL, duration, spoken language, caption file, transcript destination, player implementation, and reviewer. Assign an owner to update all of them when the demo changes. A caption track for last month's interface can be technically valid and still give the wrong instructions.

Choose captions, transcripts, and visual description

Captions convey speech and meaningful audio in time with the video. Include speaker identification when needed and sounds that affect understanding. For example, a failed-upload alert may need a caption if the narration does not explain it. W3C's caption guidance explains the content and synchronization work involved. Review generated captions for technical terms, filenames, numbers, and timing before publication.

A transcript provides a separate text version. Put it near the recording with a descriptive link such as “Read the deployment demo transcript.” Use headings and code blocks where they help someone follow the instructions without playing the recording. W3C's transcript guidance distinguishes basic transcripts from descriptive transcripts that also include visual information. A summary paragraph is useful context, but it does not reproduce a detailed tutorial.

Visual information needs a separate decision. If the presenter says “select this option” while pointing at an unlabeled setting, the audio does not identify the action. Record narration that names the setting, or provide an appropriate described version. W3C's description guidance covers integrated description and additional audio description. Do not assume a transcript alone satisfies every requirement for a prerecorded video with audio.

For the demo in this guide, narrate the important UI labels and terminal results, caption the narration, and publish a transcript containing the commands. Review the applicable media requirements for your accessibility target separately; this implementation example is not a conformance determination.

Add HTML video captions with a track element

Keep the first implementation small. Native controls avoid having to build an entire player interface yourself, although they still need testing in the browsers your audience uses.

<section aria-labelledby="demo-heading">
  <h2 id="demo-heading">Deploy a project demo</h2>
  <video id="deployment-demo" controls playsinline
         preload="metadata" width="1280" height="720"
         poster="/media/deployment-demo-poster.webp">
    <source src="/media/deployment-demo.mp4" type="video/mp4">
    <track kind="captions" src="/media/deployment-demo.en.vtt"
           srclang="en" label="English" default>
  </video>
  <p>
    <a href="/guides/deployment-demo-transcript/">
      Read the deployment demo transcript
    </a>
  </p>
</section>

The kind="captions" track identifies the text's purpose, srclang identifies its language, and label gives the menu a readable choice. The default attribute identifies the preferred track when user preferences do not select another; test actual selection rather than assuming every browser shows it identically. MDN's track element reference documents these attributes and cross-origin restrictions.

Use real media paths and a transcript containing the final recording's content. Keep the transcript link outside the video element so it remains available beside a supported player. Text inside video is fallback content for browsers without element support, not a dependable error message for an unsupported file.

Constrain the player to its content column:

video {
  display: block;
  max-width: 100%;
  height: auto;
}

The dimensions reserve the intended aspect ratio while the CSS allows a smaller layout. This example intentionally omits autoplay. MDN's video element reference covers native controls, sizing, preload hints, and playback attributes. A preload hint does not guarantee a particular download amount.

Publish and debug the WebVTT caption file

Serve the .vtt file as text/vtt. A short excerpt looks like this:

WEBVTT

00:00:00.000 --> 00:00:03.200
Open the project settings, then select Deploy.

00:00:03.400 --> 00:00:06.500
Wait for the deployment status to show Ready.

These are illustrative cues, not a complete caption file. Use timing measured against your recording. MDN's WebVTT format guide explains the signature, cue timings, and blank-line separation.

When captions are missing, inspect the track request in DevTools while selecting the caption language. Check the final URL, response status, content type, and response body. A deployment rewrite can return the application's HTML shell with status 200 for a missing caption file. Repair the asset route rather than changing its filename blindly.

Next inspect the track's language and selected mode, then check syntax and cue times. A loaded file whose cues begin after the recording ends will not help. If a CDN hosts the track, verify the media element's cross-origin configuration and the server's CORS response using the track reference above. Start with same-origin files to reduce configuration variables.

After replacing a video, verify that cached media, captions, and transcript still describe the same release. Treat them as a set in deployment review. Keep the previous working set available until the updated version passes the same checks.

Test the accessible video player as a visitor

On the deployed page, use Tab to reach the player and operate its available controls. Confirm you can start and pause, seek, select captions, adjust volume where supported, enter fullscreen, and return to the surrounding page. Native control layout and shortcuts vary by browser and device; test the supported combinations rather than prescribing one universal key sequence.

Watch the complete recording with sound off and captions enabled. Check that speech and meaningful sounds are represented, cues remain readable, and captions do not hide a command or important interface label. Then listen without watching and identify instructions that depend on an unexplained pointer or visual change.

Repeat the player task with a screen reader, a narrow viewport, and browser zoom. Record the browser, device, assistive technology, action, and result. Use the keyboard accessibility testing checklist for the surrounding focus path. If you embed a hosted player, also follow the iframe accessibility guide; a good frame title does not establish media accessibility inside it.

Test an unavailable media file too. Keep the transcript reachable and provide a useful nearby explanation or alternative. A permanent spinner leaves visitors without a recovery path.

Add focused video accessibility testing to CI

This Playwright Test example checks the fixture above: a caption declaration, its HTTP delivery, browser cue parsing, native controls, and the transcript link. Adapt the route, language, expected cue, and transcript path to a stable recording you own.

import { expect, test } from "@playwright/test";

test("deployment demo retains captions and transcript", async ({ page, request }) => {
  const origin = process.env.RELEASE_ORIGIN;
  if (!origin) throw new Error("Set RELEASE_ORIGIN to your deployed origin");
  await page.goto(new URL("/demo/", origin).href);

  const video = page.locator("#deployment-demo");
  await expect(video).toBeVisible();
  await expect(video).toHaveAttribute("controls", "");
  const track = video.locator('track[kind="captions"][srclang="en"]');
  await expect(track).toHaveCount(1);
  await expect(track).toHaveAttribute("label", "English");

  const src = await track.evaluate((node: HTMLTrackElement) => node.src);
  const response = await request.get(src, { maxRedirects: 0 });
  expect(response.status()).toBe(200);
  expect(response.headers()["content-type"]).toMatch(/^text\/vtt(?:;|$)/i);
  expect(await response.text()).toMatch(/^\uFEFF?WEBVTT(?:[ \t]|\r?\n|$)/);

  await track.evaluate((node: HTMLTrackElement) => {
    node.track.mode = "hidden";
  });
  await expect.poll(() => track.evaluate((node: HTMLTrackElement) =>
    Array.from(node.track.cues ?? [], (cue) => (cue as VTTCue).text)
  )).toContain("Open the project settings, then select Deploy.");

  const transcript = page.getByRole("link", {
    name: "Read the deployment demo transcript", exact: true,
  });
  await expect(transcript).toHaveAttribute(
    "href", "/guides/deployment-demo-transcript/"
  );
  await transcript.click();
  await expect(page.getByRole("heading", {
    name: "Deployment demo transcript", exact: true,
  })).toBeVisible();
});

Playwright's assertion documentation explains retrying assertions and expect.poll. The hidden track mode loads cues without displaying them; this assertion checks parsing, not visible caption rendering. The direct GET deliberately rejects redirects for this same-origin fixture.

Run the test in your supported browser projects. It does not prove media playback, caption accuracy, complete timing, visual description, or keyboard usability. Retain the manual pass and add this contract to your website regression testing plan.

Check the surrounding public page with Slop Audit

After reviewing the recording and player, run Slop Audit on the public demo page. Review the available automated accessibility findings, sampled keyboard-focus evidence, mobile-layout observations, and same-site runtime or failed-request evidence. Fix page-level problems and rescan to keep the repaired result beside the media review.

Slop Audit does not play through your recording, validate caption files, judge transcript accuracy, or verify every player control. Media and tracks that load only after interaction can fall outside its observed state. A skipped browser stage is a coverage gap, and a clean scan is not accessibility certification.

Keep the caption review, player/device checklist, focused CI result, and public-page report together. That gives the release reviewer concrete evidence about both the demo and the page that delivers it.