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.0 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.0.
HTML5
This failure relates to:
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:
User agents do not need to support autoplay, and it is suggested that user agents honor user preferences on the matter. Authors are urged to use the autoplay
attribute rather than using script to force the video to play, so as to allow the user to override the behavior if so desired.
Authors are urged to use the autoplay
attribute rather than using script to trigger automatic playback, as this allows the user to override the automatic playback when it is not desired, e.g. when using a screen reader. Authors are also encouraged to consider not using the automatic playback behavior at all, and instead to let the user agent wait for the user to start playback explicitly.
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.
Example Code:
<video src="ads.cgi?kind=video" autoplay loop></video>
Resources are for information purposes only, no endorsement implied.
(none currently listed)
Check if an audio
or video
element has an active audio track.
Check if the audio or video lasts longer than 3 seconds.
Check if the element has an autoplay
attribute.
Check if the element does not have a muted
attribute.
Check if no command or control has been provided to stop or pause the media element.
If checks 1-5 are true, then this failure condition applies and the content fails the Success Criterion.