Accessible Video Player: Keyboard, Captions, Controls
Also called: Accessible media player, Accessible video controls, Keyboard accessible video player
Definition
An accessible video player is a media player that every visitor can operate: all controls work with the keyboard and have names screen readers announce, captions and audio description can be switched on, and sound never starts on its own without a way to stop it. Keyboard operation falls under WCAG 2.1.1 Keyboard at Level A.
An accessible video player is more than a video with subtitles. The player itself – play button, progress bar, volume, captions toggle, fullscreen – has to work for people who can't use a mouse, can't see the screen or can't hear the sound. Many custom and embedded players fail at the first step: the play button can't be reached with Tab, or it is announced only as "button".
What it means
The controls fall under WCAG 2.1.1 Keyboard (Level A): "All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes." W3C names blind people, people with low vision and users of alternate keyboards, speech input or scanning software as the people this protects. A player also has to meet the media criteria around it:
| Requirement | Criterion | Level |
|---|---|---|
| Every control works by keyboard, no timing tricks | 2.1.1 Keyboard | A |
| Focus never gets stuck inside the player | 2.1.2 No Keyboard Trap | A |
| Controls have a name, a role and their state (playing, muted) | 4.1.2 Name, Role, Value | A |
| Captions for prerecorded video with sound | 1.2.2 Captions (Prerecorded) | A |
| Audio that plays automatically for more than 3 seconds can be paused or stopped | 1.4.2 Audio Control | A |
| Audio description for prerecorded video | 1.2.5 Audio Description (Prerecorded) | AA |
The player provides the switch, the content provides the tracks: captions and audio description only help if the player lets visitors turn them on. Sound that starts by itself is covered by audio control, and a muted background video that loops counts as moving content under pause, stop, hide.
Examples
<video id="tour" preload="metadata" poster="tour.jpg">
<source src="tour.mp4" type="video/mp4">
<track kind="captions" src="tour.en.vtt" srclang="en" label="English" default>
</video>
<div class="player-controls" role="group" aria-label="Video controls">
<button type="button" aria-label="Play">▶</button>
<input type="range" aria-label="Seek" min="0" max="180" value="0" aria-valuetext="0:00 of 3:00">
<button type="button" aria-label="Mute">🔊</button>
<button type="button" aria-pressed="true">Captions</button>
<button type="button" aria-label="Full screen">⛶</button>
</div>Every control is a real <button> or range input, so it is in the tab order and works with Enter, Space and the arrow keys – the basis of keyboard navigation. The icon buttons get an aria-label, and the play button's label switches to "Pause" while playing. aria-pressed tells screen readers whether captions are on, and aria-valuetext reads the position as time instead of a raw number. The captions come from a WebVTT <track>.
Use buttons and range inputs for controls, name every icon, update labels and states as they change, show a clearly visible focus, offer captions and a transcript, and start without sound.
Build controls from div elements, hide them until the mouse moves, autoplay audio, trap keyboard focus inside an embedded player, or offer captions that can't be switched on by keyboard.
How to check an accessible video player
Questions
What makes a video player accessible?
All controls work with the keyboard and have names, focus is visible and never trapped, captions and audio description can be turned on, and sound does not start automatically. The criteria behind this are WCAG 2.1.1, 2.1.2, 4.1.2, 1.2.2, 1.2.5 and 1.4.2.
Is the HTML5 video element accessible?
The native <video controls> gives you keyboard-operable controls in most browsers, and it supports caption tracks. You still have to provide the captions, a transcript and, where needed, audio description yourself.
Are YouTube or Vimeo embeds accessible?
Their players can be used with the keyboard, but you are responsible for the content: upload correct captions instead of relying on auto-generated ones, and give the iframe a title such as "Video: Product tour".
Do background videos need controls?
A muted background video that plays for more than five seconds next to other content needs a way to pause, stop or hide it under WCAG 2.2.2. A visible pause button is the simplest solution.
Which keyboard shortcuts should a video player support?
WCAG doesn't prescribe any. What counts is that every function is reachable with standard keys like Tab, Enter, Space and the arrow keys. If you add single-key shortcuts, users must be able to turn them off or remap them, or the keys may only work while the player has focus – that is what character key shortcuts requires.
Related terms
Keyboard Navigation: WCAG 2.1.1 Explained
Keyboard navigation means that every function of a website can be reached and operated with a keyboard alone – usually with Tab, Shift+Tab, Enter, Space and the arrow keys. WCAG 2.1.1 requires it at Level A.
Read definition: Keyboard Navigation: WCAG 2.1.1 ExplainedCaptions: Accessible Video for Deaf Viewers
Captions are synchronized text versions of a video's audio: the dialogue, who is speaking and the non-speech sounds needed to follow it. WCAG 1.2.2 requires them at Level A for all prerecorded audio in synchronized media.
Read definition: Captions: Accessible Video for Deaf ViewersAudio Description: Making Video Visuals Audible
Audio description is a spoken narration of a video's important visual content – actions, people, scene changes and on-screen text – placed in the pauses of the dialogue. WCAG 1.2.5 requires it at Level AA for all prerecorded video in synchronized media.
Read definition: Audio Description: Making Video Visuals AudibleAudio Control: Stop Autoplay Sound
Audio control is WCAG success criterion 1.4.2. If audio on a web page plays automatically for more than 3 seconds, there must be a way to pause or stop it, or to control its volume independently of the system volume.
Read definition: Audio Control: Stop Autoplay Sound