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

Rule ID: no-autoplay-audio
Ruleset: axe-core 3.5
User Impact: Moderate
Guidelines: WCAG 2.1 Experimental, WCAG 2.0 Experimental
 

Start building more accessible experiences

Axe DevTools Pro helps dev teams find and fix up to 80% of accessibility issues while coding. No experience required. Get started with your free trial today.

Compliance Data & Impact

User Impact

Moderate
Minor
Critical

Disabilities Affected

  • Blind
  • Deafblind
  • Cognitive

Standard(s)

  • WCAG 2.1 Experimental
  • WCAG 2.0 Experimental

WCAG Success Criteria [WCAG 2.1 Experimental]

  • 1.4.2: MAY: Audio Control

WCAG Success Criteria [WCAG 2.0 Experimental]

  • 1.4.2: MAY: Audio Control

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.

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.

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.

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.

Resources

Refer to the complete list of axe 3.5 rules.

Was this information helpful?

You have already given your feedback, thank you..

Your response was as follows:

Was this information helpful?
Date/Time feedback was submitted: