Skip to content

Commit

Permalink
fix: autoplay attribute usage in no-autoplay-audio rule (aaa1bf /…
Browse files Browse the repository at this point in the history
… 4c31df / 80f0bf) (#995)

* fix links to atomic rules

* change auto-play to autoplay

* remove backticks around the word autoplay

* Update _rules/auto-play-audio-does-not-exceed-3-seconds-aaa1bf.md

Co-Authored-By: Jean-Yves Moyen <jym@siteimprove.com>

* Apply suggestions from code review

Co-Authored-By: Jean-Yves Moyen <jym@siteimprove.com>

* update based on changes requested

* Apply suggestions from code review

Co-Authored-By: Jean-Yves Moyen <jym@siteimprove.com>
  • Loading branch information
2 people authored and Brynanders committed Nov 8, 2019
1 parent f7f74ac commit 05dc9d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions _rules/auto-play-audio-does-not-exceed-3-seconds-aaa1bf.md
@@ -1,9 +1,9 @@
---
id: aaa1bf
name: auto-play audio does not exceed 3 seconds
name: audio or video that plays automatically does not exceed 3 seconds
rule_type: atomic
description: |
auto-play audio content does not output audio for more than 3 seconds
content that plays automatically does not output audio for more than 3 seconds.
accessibility_requirements:
input_aspects:
- DOM Tree
Expand Down Expand Up @@ -56,7 +56,7 @@ There are no major accessibility support issues known for this rule.

#### Passed Example 1

The `<audio>` element does not auto-play for more than 3 seconds.
The `<audio>` element does not play automatically for more than 3 seconds.

```html
<audio src="../test-assets/moon-audio/moon-speech.mp3#t=25" autoplay="true"></audio>
Expand All @@ -77,15 +77,15 @@ The `<video>` element audio output does not last longer than 3 seconds.

#### Failed Example 1

The `<audio>` auto-plays for more than 3 seconds.
The `audio` element plays automatically for more than 3 seconds.

```html
<audio src="../test-assets/moon-audio/moon-speech.mp3" autoplay="true" controls></audio>
```

#### Failed Example 2

The `<video>` element audio auto-plays for more than 3 seconds.
The `video` element automatically plays some audio for more than 3 seconds.

```html
<video autoplay="true">
Expand Down
4 changes: 2 additions & 2 deletions _rules/auto-play-audio-has-control-mechanism-4c31df.md
@@ -1,9 +1,9 @@
---
id: 4c31df
name: auto-play audio has a control mechanism
name: audio or video that plays automatically has a control mechanism
rule_type: atomic
description: |
auto-play audio or video must have a control mechanism.
audio or video that plays automatically must have a control mechanism.
accessibility_requirements:
input_aspects:
- DOM Tree
Expand Down
10 changes: 5 additions & 5 deletions _rules/no-auto-play-audio-80f0bf.md
@@ -1,9 +1,9 @@
---
id: 80f0bf
name: Video or audio has no auto-play audio
name: audio or video has no audio that plays automatically
rule_type: composite
description: |
This rule checks that auto-play audio does not last for more than 3 seconds, or the audio has a control mechanism to stop or mute it.
This rule checks that automatically playing audio does not last for more than 3 seconds, or the audio has a control mechanism to stop or mute it.
accessibility_requirements:
wcag20:1.4.2: # Audio Control (A)
forConformance: true
Expand Down Expand Up @@ -39,8 +39,8 @@ The default value of both `paused` and `muted` attributes is `false`.

For each test target, the outcome of at least one of the following rules is passed:

- [Auto-play audio does not exceed 3 seconds](https://act-rules.github.io/_rules/auto-play-audio-has-control-mechanism-4c31df.md)
- [Auto-play audio has control mechanism](https://act-rules.github.io/_rules/auto-play-audio-exceeds-3-seconds-aaa1bf.md)
- [audio or video that plays automatically has a control mechanism](https://act-rules.github.io/rules/4c31df)
- [audio or video that plays automatically does not exceed 3 seconds](https://act-rules.github.io/rules/aaa1bf)

## Assumptions

Expand Down Expand Up @@ -160,7 +160,7 @@ The `<video>` element has no audio output.

#### Inapplicable Example 3

The `<audio>` element does not `autoplay`.
The `audio` element does not play automatically.

```html
<audio src="../test-assets/moon-audio/moon-speech.mp3" controls></audio>
Expand Down

0 comments on commit 05dc9d4

Please sign in to comment.