Failure of Success Criterion 1.4.2 for absence of a way to pause or stop an HTML5 media element that autoplays

Important Information about Techniques

See Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.1 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does not imply that the technology can be used in all situations to create content that meets WCAG 2.1.

Applicability

HTML5

This technique relates to Success Criterion 1.4.2: Audio Control (Failure).

Description

This failure occurs when an audio or video element with an audio track contains the autoplay attribute and does not contain the muted attribute, and no controls or commands have been provided to pause or stop the media resource.

When the autoplay attribute is present, the user agent will automatically begin playback of the media resource as soon as it can do so without stopping. When the muted attribute is present, the user agent will initially mute the media resource's audio output, overriding any user preference.

If the media element is shorter than 3 seconds, the failure does not occur. If the user agent provides user preferences to override autoplay behavior, the failure does not occur.

The HTML spec contains the following notes:

Examples

Example 1: An auto-playing audio track

In this example, the advertising video contains an audio track. The video will play continuously because of the loop attribute, and the video will start automatically because of the autoplay attribute and because there does not appear to be any controls to allow the user to stop the video.

				 <video src="ads.cgi?kind=video" autoplay loop></video>
            

Resources

Resources are for information purposes only, no endorsement implied.

Tests

Procedure

  1. Check if an audio or video element has an active audio track.
  2. Check if the audio or video lasts longer than 3 seconds.
  3. Check if the element has an autoplay attribute.
  4. Check if the element does not have a muted attribute.
  5. Check if no command or control has been provided to stop or pause the media element.

Expected Results

  • If checks 1-5 are true, then this failure condition applies and the content fails the Success Criterion.