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
30 changes: 15 additions & 15 deletions _rules/image-accessible-name-descriptive-qt1vmo.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This `img` element has an `alt` attribute that describes the image.

```html
<html lang="en">
<img src="/test-assets/shared/w3c-logo.png" alt="W3C" />
<img src="/test-assets/shared/w3c-logo.png" alt="W3C logo" />
</html>
```

Expand Down Expand Up @@ -110,13 +110,13 @@ This `canvas` element has an `aria-label` attribute that describes the image.

```html
<html lang="en">
<canvas id="logo" width="72" height="48" aria-label="W3C"></canvas>
<canvas id="logo" width="72" height="48" aria-label="W3C logo"></canvas>
<script>
const img = new Image();
img.src = '/test-assets/shared/w3c-logo.png';
img.onload = function () {
const ctx = document.querySelector('#logo').getContext('2d');
ctx.drawImage(img, 0, 0);
const img = new Image()
img.src = '/test-assets/shared/w3c-logo.png'
img.onload = function() {
const ctx = document.querySelector('#logo').getContext('2d')
ctx.drawImage(img, 0, 0)
}
</script>
</html>
Expand All @@ -130,7 +130,7 @@ This `img` element has an `alt` attribute that incorrectly describes the image.

```html
<html lang="en">
<img src="/test-assets/shared/w3c-logo.png" alt="ERCIM" />
<img src="/test-assets/shared/w3c-logo.png" alt="ERCIM logo" />
</html>
```

Expand Down Expand Up @@ -161,13 +161,13 @@ This `canvas` element has an `aria-label` attribute that incorrectly describes t

```html
<html lang="en">
<canvas id="logo" width="72" height="48" aria-label="HTML 5"></canvas>
<canvas id="logo" width="72" height="48" aria-label="HTML 5 logo"></canvas>
<script>
const img = new Image();
img.src = '/test-assets/shared/w3c-logo.png';
img.onload = function () {
const ctx = document.querySelector('#logo').getContext('2d');
ctx.drawImage(img, 0, 0);
const img = new Image()
img.src = '/test-assets/shared/w3c-logo.png'
img.onload = function() {
const ctx = document.querySelector('#logo').getContext('2d')
ctx.drawImage(img, 0, 0)
}
</script>
</html>
Expand Down Expand Up @@ -235,7 +235,7 @@ This `img` element is not [visible][].

```html
<html lang="en">
<img src="/test-assets/shared/w3c-logo.png" alt="W3C" style="display:none" />
<img src="/test-assets/shared/w3c-logo.png" alt="W3C logo" style="display:none" />
</html>
```

Expand Down
2 changes: 1 addition & 1 deletion _rules/image-not-in-acc-tree-is-decorative-e88epe.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ This `canvas` element which has no [semantic role][] and an empty (`""`) [access
This `img` element is [included in the accessibility tree][] because the `alt` attribute is not empty (`""`).

```html
<img src="/test-assets/shared/w3c-logo.png" alt="W3C" />
<img src="/test-assets/shared/w3c-logo.png" alt="W3C logo" />
```

#### Inapplicable Example 2
Expand Down
2 changes: 1 addition & 1 deletion _rules/object-has-acessible-name-8fc3b6.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This `object` element which embeds a video resource has a non-empty [accessible
This `object` element which embeds an image resource has a non-empty [accessible name][] through its `aria-labelledby` attribute.

```html
<span id="label">W3C</span> <object aria-labelledby="label" data="/test-assets/shared/w3c-logo.png"></object>
<span id="label">W3C logo</span> <object aria-labelledby="label" data="/test-assets/shared/w3c-logo.png"></object>
```

#### Passed Example 4
Expand Down