Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions _rules/auto-play-audio-does-not-exceed-3-seconds-aaa1bf.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ acknowledgements:

This rule applies to any `audio` or `video` element that has:

- an `autoplay` attribute that is equal to true, and
- both `paused` and `muted` attributes equal to false, and
- an `autoplay` attribute whose value is true, and
- both `paused` and `muted` attributes whose values are both false, and
- either a `src` attribute or a child `source` element that references content with a duration of more than 3 seconds that contains audio.

**Note:**
Expand Down Expand Up @@ -65,15 +65,15 @@ There are no major accessibility support issues known for this rule.
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>
<audio src="/test-assets/moon-audio/moon-speech.mp3#t=25" autoplay></audio>
```

#### Passed Example 2

The `<video>` element audio output does not last longer than 3 seconds.

```html
<video autoplay="true">
<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" />
</video>
Expand All @@ -86,15 +86,15 @@ The `<video>` element audio output does not last longer 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>
<audio src="/test-assets/moon-audio/moon-speech.mp3" autoplay controls></audio>
```

#### Failed Example 2

The `video` element automatically plays some audio for more than 3 seconds.

```html
<video autoplay="true">
<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>
Expand All @@ -104,10 +104,10 @@ The `video` element automatically plays some audio for more than 3 seconds.

#### Inapplicable Example 1

The `video` element is `muted`.
The `<video>` element audio autoplays for longer than 3 seconds, but is `muted`.

```html
<video autoplay="true" muted="true">
<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>
Expand All @@ -118,7 +118,7 @@ The `video` element is `muted`.
The `video` element `src` file has no audio output.

```html
<video autoplay="true">
<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>
Expand Down
26 changes: 13 additions & 13 deletions _rules/auto-play-audio-has-control-mechanism-4c31df.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ htmlHintIgnore:

This rule applies to any `audio` or `video` element that has:

- an `autoplay` attribute that is equal to true, and
- both `paused` and `muted` attributes equal to false, and
- an `autoplay` attribute whose value is true, and
- both `paused` and `muted` attributes whose values are both false, and
- either a `src` attribute or a child `source` element that references content with a duration of more than 3 seconds that contains audio.

**Note:**
Expand Down Expand Up @@ -68,15 +68,15 @@ The native `<video>` and `<audio>` controls in several browser and assistive tec
The `<audio>` element has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

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

#### Passed Example 2

The `<video>` element has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

```html
<video autoplay="true" controls>
<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>
Expand All @@ -103,7 +103,7 @@ The `<video>` element has a custom [mechanism](https://www.w3.org/TR/WCAG21/#dfn
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay="true">
<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>
Expand All @@ -124,15 +124,15 @@ The `<video>` element has a custom [mechanism](https://www.w3.org/TR/WCAG21/#dfn
The `<audio>` does not have a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

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

#### Failed Example 2

The `<video>` element autoplays and does not have a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

```html
<video autoplay="true">
<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>
Expand Down Expand Up @@ -160,7 +160,7 @@ The `<video>` has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay="true">
<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>
Expand Down Expand Up @@ -195,7 +195,7 @@ The `<video>` has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay="true">
<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>
Expand Down Expand Up @@ -230,7 +230,7 @@ The `<video>` has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay="true">
<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>
Expand All @@ -248,10 +248,10 @@ The `<video>` has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to

#### Inapplicable Example 1

The `<video>` element is `muted`.
The `<video>` element audio autoplays for longer than 3 seconds, but is `muted`.

```html
<video autoplay="true" muted="true">
<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>
Expand All @@ -262,7 +262,7 @@ The `<video>` element is `muted`.
The `<video>` element `src` file has no audio output.

```html
<video autoplay="true">
<video autoplay>
<source src="/test-assets/rabbit-video/video-with-incorrect-voiceover.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video-with-incorrect-voiceover.webm" type="video/webm" />
</video>
Expand Down
18 changes: 9 additions & 9 deletions _rules/no-auto-play-audio-80f0bf.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ htmlHintIgnore:

This rule applies to any `audio` or `video` element that has:

- an `autoplay` attribute that is equal to true, and
- both `paused` and `muted` attributes equal to false, and
- an `autoplay` attribute whose value is true, and
- both `paused` and `muted` attributes whose values are both false, and
- either a `src` attribute or a child `source` element that references content with a duration of more than 3 seconds that contains audio.

**Note:**
Expand Down Expand Up @@ -64,15 +64,15 @@ The native `<video>` and `<audio>` controls in several browser and assistive tec
The `<audio>` element has a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

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

#### Passed Example 2

The `<video>` element does not play for longer than 3 seconds.

```html
<video autoplay="true">
<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" />
</video>
Expand All @@ -99,7 +99,7 @@ The `<video>` element autoplays, and has a [mechanism](https://www.w3.org/TR/WCA
<body>
<div id="video-container">
<!-- Video -->
<video id="video" autoplay="true">
<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>
Expand All @@ -120,15 +120,15 @@ The `<video>` element autoplays, and has a [mechanism](https://www.w3.org/TR/WCA
The `<audio>` element autoplays, lasts for more than 3 seconds, and does not have a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

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

#### Failed Example 2

The `<video>` element audio autoplays for longer than 3 seconds, and does not have a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to pause or stop or turn the audio volume off.

```html
<video autoplay="true">
<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>
Expand All @@ -141,7 +141,7 @@ The `<video>` element audio autoplays for longer than 3 seconds, and does not ha
The `<video>` element audio autoplays for longer than 3 seconds, but is `muted`.

```html
<video autoplay="true" muted="true">
<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>
Expand All @@ -152,7 +152,7 @@ The `<video>` element audio autoplays for longer than 3 seconds, but is `muted`.
The `<video>` element has no audio output.

```html
<video autoplay="true">
<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>
Expand Down