-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update 80f0bf - audio or video avoids automatically playing audio #1655
base: develop
Are you sure you want to change the base?
Conversation
- [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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). | |
The [instrument][] to pause or stop or turn the audio volume off is [visible](#visible), [included in the accessibility tree](#included-in-the-accessibility-tree), and it has an [accessible name](#accessible-name) that is not only [whitespace](#whitespace). |
My preference, feel free to ignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think this expectation should go away in favour of #1632 (where I somehow seem to have forgotten to remove it 😖 )
- [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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think this expectation should go away in favour of #1632 (where I somehow seem to have forgotten to remove it 😖 )
@@ -89,12 +96,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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This `video` element has an [instrument][] to pause, stop, or turn the audio volume off. | |
This `video` element has (in its default controls) an [instrument][] to pause it, an [instrument][] to stop it, and an [instrument][] to turn its audio volume off. |
|
||
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]. | ||
|
||
No [user style sheets](https://drafts.csswg.org/css-cascade/#cascade-origin-user) are used and no changes to the [user agent default style sheet](https://drafts.csswg.org/css-cascade/#cascade-origin-ua) are in place, otherwise the test cases might have different outcomes of the ones presented here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that part go under the Test Cases heading to be in line with #1654 ? Otherwise approving.
@@ -1,9 +1,9 @@ | |||
--- | |||
id: 80f0bf | |||
name: '`audio` or `video` avoids automatically playing audio' | |||
rule_type: composite | |||
rule_type: atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this change requires us to deprecate the 3 previous rules, and have a new one.
@@ -51,29 +53,32 @@ 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems slightly ambiguous to me. Should we do this based on the duration property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work based on the duration because the media resource could have a duration longer than 3 seconds, while the audio in the media resource is shorter than 3 seconds.
What exactly is ambiguous in the current description?
Following @WilcoFiers suggestion, I deprecated the 3 rules and created a new one with the changes that have been made to transform the prior composite into an atomic. |
…4.md Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
…4.md Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Enough changes made for needing you to review again
- **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 | ||
- **audio duration**: the element has a [media resource][] for which the audio output lasts longer than 3 seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use dfn
elements for the condition list (and possibly link to the correct condition from corresponding examples).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added dfn
elements and updated inapplicable examples accordingly
Changes made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, approving already.
_rules/audio-or-video-avoids-automatically-playing-audio-x0paj4.md
Outdated
Show resolved
Hide resolved
|
||
This rule assumes that it is not sufficient for the [instrument][] to control the sound to be located on a different [web page][], or a different state of the same [web page][] to pass the rule. [Instruments][instrument] located on other pages can still create accessibility issues for users relying on sound to navigate (e.g. screen reader users) since the autoplaying sound will interfere with their ability to find and activate the [instrument][]. If an [instrument][] external to the [web page][] is provided, this rule will fail but it is still possible to satisfy [Success Criterion 1.4.2 Audio Control][sc142]. | ||
|
||
This rule assumes that the [instrument][] to control the sound is visible and accessible in order to be effective and usable by all kinds of users. If the [instrument][] is hidden to some users, it is possible to pass this rule but still not satisfy [Success Criterion 1.4.2 Audio Control][sc142]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that be merged with the Background note on the same topic?
I'm not sure this needs to be an Assumption (since we do have a "further testing needed" mapping already).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
### Bibliography | ||
|
||
- [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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to link to MDN from a W3C site?
Is there some similar W3C document we could link to instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion!
…4.md Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
_rules/audio-or-video-avoids-automatically-playing-audio-x0paj4.md
Outdated
Show resolved
Hide resolved
<audio src="/test-assets/moon-audio/moon-speech.mp3" autoplay></audio> | ||
``` | ||
|
||
#### Failed Example 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example somewhat contradicts the idea that whether a failed example fails shouldn't depend on accessibility support. I'm a little worried this example could block implementations that run in Chromium. I know that could happen in axe Pro (although we have no tools testing this today). I'm pretty sure Trusted Tester would be impacted though, as it is tested in Edge.
So from that angle I'm not sure I would want this example in. On the other hand, not having a failed video example in it feels like a problem too. We could possibly wait with this rule until we have this "optional examples" idea worked out. A different option could be to modify the rule so that it isn't just about autocomplay, but more generally about media elements that start playing without user interaction within the first 3 second of the page loading? That feels like a reasonable improvement on this rule anyway, and we could then add videos that get turned on through a script during onload.
…4.md Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
Closes issue(s):
audio
orvideo
has no audio that plays automatically (80f0bf)? #1502Need for Final Call:
How to Review And Approve