Audio must have controls that provide users with the ability to stop automatically played audio after three seconds

Rule ID: no-autoplay-audio
User Impact: Moderate
WCAG: 1.4.2

Compliance Data & Impact

User Impact

Disabilities Affected

  • Blind
  • Deafblind
  • Cognitive

Requirement(s)

Note: Experimental rule

WCAG Success Criteria

  • 1.4.2 Audio Control

Section 508 Guidelines

  • Not specified, or not applicable

Rule Description

Ensures <video> or <audio> elements do not autoplay audio for more than three seconds without a control mechanism to stop or mute the audio.

Why it Matters

People who are blind or have low vision and use screen reading software can find it hard to hear the screen reader’s speech output if there is other audio playing at the same time. If automatically playing audio lasts more than three seconds, an easily located, accessible mechanism must be provided to pause or stop the audio or control the audio volume. An audio control allows screen reader users to hear the screen reader without other sounds playing.

Note:

Playing audio automatically when landing on a page may affect a screen reader user’s ability to find the mechanism to stop it because they navigate by listening and automatically started sounds might interfere with that navigation. Therefore, we discourage the practice of automatically starting sounds (especially if they last more than three seconds), and encourage that the sound be started by an action initiated by the user after they reach the page, rather than requiring that the sound be stopped by an action of the user after they land on the page.

How to Fix the Problem

Fix this issue by using ONE of the following techniques:

  1. Only start audio by an action initiated by the user (strongly preferred).
  2. Stop the auto-playing audio within three seconds.
  3. Provide an easily located, accessible mechanism to stop, pause, mute, or adjust volume for audio that automatically plays for more than 3 seconds.

The Algorithm (in simple terms)

The algorithm for this rule returns:

  • Undefined when <audio> has no source (duration cannot be interpreted).
  • Undefined when <video> has no source (duration cannot be interpreted
  • False when <audio> can autoplay and has no controls mechanism.
  • False when <video> can autoplay and has no controls mechanism
  • False when <audio> plays less than three seconds but loops.
  • True when <video> can autoplay and duration is less than three seconds (by passing options).
  • True when <video> can autoplay and duration is below allowed duration (by setting playback range).
  • True when <audio> can autoplay but has controls mechanism.
  • True when <video> can autoplay and has controls mechanism.