Audio must have controls that provide users with the ability to stop automatically played audio after three seconds
How to Fix the Problem
Fix this issue by using ONE of the following techniques:
Only start audio by an action initiated by the user (strongly preferred).
Stop the auto-playing audio within three seconds.
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.
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.
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.