ACT-R3: Audio and video auto-play
Important Information for reviewing ACT Rules
Important: The ACT Rules on this page are a demonstration of how they might be published by the W3C. The goal of this page is to add concrete examples for the Accessibility Conformance Testing Rules Format (DRAFT). Neither the ACT Rules, or the way they are presented here has been approved by the Accessibility Guidelines Working Group. If you have feedback, please comment by filing GitHub issues in the WCAG ACT repository, if this is not feasible, by email to firstname.lastname@example.org.
This conformance rule relates to:
- Success Criterion 1.4.2 (Audio Control)
This test checks that any sound that plays automatically when a web page is loaded stops after 3 seconds or the web page provides a user control to turn off the sound.
- G60: Playing a sound that turns off automatically within three seconds
- G170: Providing a control near the beginning of the Web page that turns off sounds that play automatically
- G171: Playing sounds only on user request
- F23: Failure of 1.4.2 due to playing a sound longer than 3 seconds where there is no mechanism to turn it off
- F93: Failure of Success Criterion 1.4.2 for absence of a way to pause or stop an HTML5 media element that autoplays
- This rule states that the links or buttons for the mechanism to control the sound is one of the first five links or buttons on the web page. This is more specific then the WCAG documentation.
Select all elements that match the following CSS Selector:
audio[src], audio > source[src], video[src], video > source[src]
Check if the
video is paused. Check
If true, return step1-pass
Else continue with step 2
Check if the sound is muted. Check
If true, return step2-pass
Else continue with step 3
Check that the sound is no longer than 3 seconds.
duration property is no longer than 3 seconds.
If true, continue with step 4
Else continue with Step 5
Check if the sound has a loop. Check
If true, continue with Step 5
Else, return step4-pass
Check if the page is playing audio.
User Input Question:
|highlight||The selected audio / video element|
|question||Is there audio playing in the media player?|
|help||There should not be audio playing automatically on the web page loads.|
|user profile||Requires hearing|
If yes, continue with Step 6.
Else, return step5-pass
Check if a mechanism to control the sound is provided as one of the first five links or buttons on the web page.
User Input Question:
|question||Does the web page provide a mechanism to control the sound as one of the first five links or buttons?|
|help||A mechanism to pause or stop the video or audio, or control the volume or mute the audio must be available on the web page. The mechanism must be located as one of the first five links or buttons of the web page. This way people (with screen readers) can turn off the sound before reading the web page. To inspect this, use the tab key to navigate through the web page.|
If yes, return step6-pass
Else, return step6-fail
The resulting assertion is as follows,
|subject||the selected element|
|result||« One TestResult from below »|
|description||The video / audio is paused|
|description||The video / audio is muted|
|description||The video / audio is shorter than 3 seconds|
|description||No sound is coming from the audio / video element|
|description||The sound in the audio / video can easily be stopped.|
|description||There is no mechanism to stop the auto-playing sound of the audio / video.|
This is the first version of this rule.
To validate the implementation of this rule, all test cases for ACT-R3 must be passed.