From 2c9e2291560b60ae3b0d7f246400e66886692bc7 Mon Sep 17 00:00:00 2001 From: Carlos Duarte Date: Fri, 18 Jun 2021 20:01:42 +0100 Subject: [PATCH 01/38] update audio or video avoids automatically playing audio --- ...oids-automatically-playing-audio-80f0bf.md | 145 ++++++++- ...-audio-does-not-exceed-3-seconds-aaa1bf.md | 131 -------- ...play-audio-has-control-mechanism-4c31df.md | 279 ------------------ 3 files changed, 132 insertions(+), 423 deletions(-) delete mode 100755 _rules/auto-play-audio-does-not-exceed-3-seconds-aaa1bf.md delete mode 100755 _rules/auto-play-audio-has-control-mechanism-4c31df.md diff --git a/_rules/audio-or-video-avoids-automatically-playing-audio-80f0bf.md b/_rules/audio-or-video-avoids-automatically-playing-audio-80f0bf.md index 64e66ec3544..f32301d1d72 100755 --- a/_rules/audio-or-video-avoids-automatically-playing-audio-80f0bf.md +++ b/_rules/audio-or-video-avoids-automatically-playing-audio-80f0bf.md @@ -51,20 +51,21 @@ This rule applies to any `audio` or `video` element for which all the following - **autoplay**: the element has an `autoplay` [attribute value][] of `true`; and - **not muted**: the element has a `muted` [attribute value][] of `false`; and - **not paused**: the element has a `paused` [attribute value][] of `false`; and -- **duration**: the element has a [media resource][] lasting more than 3 seconds and that contains audio. +- **audio duration**: the element has a [media resource][] for which the audio output lasts more than 3 seconds. -## Expectation +## Expectation 1 -For each test target, the [outcome](#outcome) of at least one of the following rules is passed: +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. -- [Audio Or Video That Plays Automatically Has A Control Mechanism](https://act-rules.github.io/rules/4c31df) -- [Audio Or Video That Plays Automatically Has No Audio That Lasts More Than 3 Seconds](https://act-rules.github.io/rules/aaa1bf) +## Expectation 2 + +The [instrument][] to pause or stop or turn the audio volume off is [visible](#visible), has an [accessible name](#accessible-name) that is not only [whitespace](#whitespace), and is [included in the accessibility tree](#included-in-the-accessibility-tree). ## Assumptions -- This rule assumes that it is not possible to satisfy [Success Criterion 1.4.2 Audio Control][sc142] if the total length of the automatically playing audio is more than 3 seconds, even if there are pauses in the sound and no more than 3 seconds in a row with actual sound. -- This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to control the sound must be located in the same [web page][]. Mechanisms located on other pages can still create accessibility issues for users relying on sound to navigate (e.g. screen readers users) since the autoplaying sound will interfere with their ability to find and activate the mechanism. If a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) external to the [web page][] is provided, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142]. -- This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to control the sound must be visible and accessible in order to be effective and usable by all kinds of users. If the mechanism is hidden to some users, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142]. +This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to control the sound must be located in the same [web page][]. Mechanisms located on other pages can still create accessibility issues for users relying on sound to navigate (e.g. screen readers users) since the autoplaying sound will interfere with their ability to find and activate the mechanism. If a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) external to the [web page][] is provided, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142]. + +This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to control the sound must be visible and accessible in order to be effective and usable by all kinds of users. If the mechanism is hidden to some users, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142]. ## Accessibility Support @@ -74,6 +75,8 @@ The native `video` and `audio` controls in several browser and assistive technol - [Understanding Success Criterion 1.4.2: Audio Control](https://www.w3.org/WAI/WCAG21/Understanding/audio-control.html) - [Accessible Multimedia](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Multimedia) +- [Failure of Success Criterion 1.4.2 for absence of a way to pause or stop an HTML5 media element that autoplays](https://www.w3.org/WAI/WCAG21/Techniques/failures/F93) +- [G170: Providing a control near the beginning of the Web page that turns off sounds that play automatically](https://www.w3.org/WAI/WCAG21/Techniques/general/G170) ## Test Cases @@ -89,12 +92,12 @@ This `audio` element has an [instrument][] to pause, stop, or turn the audio vol #### Passed Example 2 -This `video` element does not play for longer than 3 seconds. +This `video` element has an [instrument][] to pause, stop, or turn the audio volume off. ```html -