-
Notifications
You must be signed in to change notification settings - Fork 82
Add inapplicable examples for the audio/video autoplay rule #2371
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for act-rules ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Jym77
left a comment
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.
Typo. Approving already.
_rules/audio-or-video-avoids-automatically-playing-audio-80f0bf.md
Outdated
Show resolved
Hide resolved
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.
Agree with JYM's comments. I also found a problem with the applicability because of this. Interesting edge case here.
| This `video` element does not play for longer than 3 seconds. | ||
|
|
||
| ```html | ||
| <video autoplay> | ||
| <source src="/test-assets/rabbit-video/video.mp4#t=8,10" type="video/mp4" /> | ||
| <source src="/test-assets/rabbit-video/video.webm#t=8,10" type="video/webm" /> |
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 one's actually kind of tricky. The media resource has a duration of 13 seconds, but the video has a play time of 2 seconds. I think we'll need to update the applicability.
Something like:
- **play time**: the element has a [media resource][] that contains audio and that stops no more than 3
**Note**: For most videos the start time is 0, and the stop time is the end of the video. In HTML the `t` parameter allows content authors to set the start and stop time of a video.
@Jym77 WDYT?
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.
Yes, good point. Maybe phrasing the second sentence a bit more generically and with a link to specs:
This can be changed by authors, for example using a [temporal media fragment URI](https://www.w3.org/TR/media-frags/#naming-time) (`#t`) in the source URI.
| - **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. | ||
| - **play time**: the element has a [media resource][] that contains audio and that stops after no more than 3 seconds. This can be changed by authors, for example using a [temporal media fragment URI](https://www.w3.org/TR/media-frags/#naming-time) (`#t`) in the source URI. |
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 believe this is incorrect. In the context of:
This rule applies to any
audioorvideoelement for which all the following are true:
If we only consider videos with a play time of < 3s, the SC would always pass by default.
Instead, I believe we should consider:
- all videos, with the two stated expectations applied OR
- only videos longer > 3s, with only the 1st expectation needed, since videos shorter than 3 seconds would be considered inapplicable.
| #### Passed Example 3 | ||
|
|
||
| This `video` element autoplays and has an [instrument][] to pause, stop, or turn the audio volume off. | ||
| This `video` element is longer than 3 seconds, autoplays, and 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 is longer than 3 seconds, autoplays, and has an [instrument][] to pause, stop, or turn the audio volume off. | |
| This `video` element is longer than 3 seconds and autoplays; however, it passes the rule because it provides an [instrument][] that allows the user to pause, stop, or turn the audio volume off. |
Suggestion to clearly separate the conditions that would cause the rule to fail from those that allow it to pass, explicitly highlighting the feature that makes the rule pass.
giacomo-petri
left a comment
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’ve added a couple of comments. The one regarding applicability is mandatory in my view, the other is just editorial.
Adds inapplicable examples for the audio/video autoplay rule.
https://deploy-preview-2371--act-rules.netlify.app/standards-guidelines/act/rules/80f0bf/proposed/
Closes issue(s):
Need for Call for Review:
This will require a 1 week Call for Review
How to Review And Approve