| id | 4c31df | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | Audio or video element that plays automatically has a control mechanism | |||||||||||
| rules_format | 1.1 | |||||||||||
| rule_type | atomic | |||||||||||
| description | audio or video that plays automatically must have a control mechanism. | |||||||||||
| accessibility_requirements |
|
|||||||||||
| input_aspects |
|
|||||||||||
| acknowledgments |
|
|||||||||||
| htmlHintIgnore |
|
This rule applies to any audio or video element for which all the following are true:
- (autoplay) the element has an
autoplayattribute value oftrue; and - (not muted) the element has a
mutedattribute value offalse; and - (not paused) the element has a
pausedattribute value offalse; and - (duration) the element has a media resource lasting more than 3 seconds and that contains audio.
For each test target, there is at least one instrument in the same web page to pause or stop the audio, or turn the audio volume off independently from the overall system volume control.
The instrument to pause or stop or turn the audio volume off is visible, has an accessible name that is not only whitespace, and is included in the accessibility tree.
There are no assumptions.
The native video and audio controls in several browser and assistive technology combinations are not keyboard accessible and the video or audio element itself may not be announced. Authors are recommended to use custom controls for keyboard navigation and cross browser accessibility support in general.
- Understanding Success Criterion 1.4.2: Audio Control
- Failure of Success Criterion 1.4.2 for absence of a way to pause or stop an HTML5 media element that autoplays
- G170: Providing a control near the beginning of the Web page that turns off sounds that play automatically
This audio element has an instrument to pause, stop, or turn the audio volume off.
<audio src="/test-assets/moon-audio/moon-speech.mp3" autoplay controls></audio>This video element has an instrument to pause, stop, or turn the audio volume off.
<video autoplay controls>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>This video element has a custom instrument to pause or stop or turn the audio volume off.
<head>
<style>
button {
color: #000;
}
button:hover {
cursor: pointer;
cursor: pointer;
background-color: grey;
color: white;
}
</style>
</head>
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>
<!-- Video Controls -->
<div id="video-controls">
<button type="button" id="play-pause" class="play">Pause</button>
<button type="button" id="mute">Mute</button>
</div>
</div>
<script src="/test-assets/80f0bf/no-autoplay.js"></script>
</body>This audio element does not have an instrument to pause, stop, or turn the audio volume off.
<audio src="/test-assets/moon-audio/moon-speech.mp3" autoplay></audio>This video element autoplays and does not have an instrument to pause, stop, or turn the audio volume off.
<video autoplay>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>This video element has an instrument to pause, stop, or turn the audio volume off but the instrument is not visible.
<head>
<style>
button {
color: #000;
display: none;
}
button:hover {
cursor: pointer;
cursor: pointer;
background-color: grey;
color: white;
}
</style>
</head>
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>
<!-- Video Controls -->
<div id="video-controls">
<button type="button" id="play-pause" class="play">Pause</button>
<button type="button" id="mute">Mute</button>
</div>
</div>
<script src="/test-assets/80f0bf/no-autoplay.js"></script>
</body>This video element has an instrument to pause, stop, or turn the audio volume off but its button elements do not have accessible names.
<head>
<style>
button {
color: #000;
}
button:hover {
cursor: pointer;
cursor: pointer;
background-color: grey;
color: white;
}
</style>
</head>
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>
<!-- Video Controls -->
<div id="video-controls">
<button type="button" id="play-pause" class="play"></button>
<button type="button" id="mute"></button>
</div>
</div>
<script src="/test-assets/80f0bf/no-autoplay.js"></script>
</body>This video element has an instrument to pause, stop, or turn the audio volume off but the instrument is not included in the accessibility tree.
<head>
<style>
button {
color: #000;
}
button:hover {
cursor: pointer;
cursor: pointer;
background-color: grey;
color: white;
}
</style>
</head>
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>
<!-- Video Controls -->
<div id="video-controls" aria-hidden="true">
<button type="button" id="play-pause" class="play">Play</button>
<button type="button" id="mute">Mute</button>
</div>
</div>
<script src="/test-assets/80f0bf/no-autoplay.js"></script>
</body>The audio of this video element autoplays for longer than 3 seconds but is muted.
<video autoplay muted>
<source src="/test-assets/rabbit-video/video.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video.webm" type="video/webm" />
</video>The src file of this video element has no audio output.
<video autoplay>
<source src="/test-assets/rabbit-video/silent.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/silent.webm" type="video/webm" />
</video>This audio element does not autoplay.
<audio src="/test-assets/moon-audio/moon-speech.mp3" controls></audio>