Skip to content
Merged
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
39 changes: 24 additions & 15 deletions _rules/link-non-empty-accessible-name-c487ae.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,42 @@ This `area` element has a [semantic role][] of `link` and an [accessible name][]
This `a` element has an empty [accessible name][].

```html
<a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="none"/></a>
<a href="http://www.w3.org/WAI"></a>
```

#### Failed Example 2

This `a` element with a decorative image has an empty [accessible name][].
This `a` element with an image has an empty [accessible name][]. The image is decorative and is marked as such with an empty `alt` [attribute value][].

```html
<a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" alt=""/></a>
```

#### Failed Example 3

This `a` element with an image has an empty [accessible name][]. The image is decorative because it has a `role` [attribute value][] of `presentation`.

```html
<a href="http://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="presentation"/></a>
```

#### Failed Example 4

This `a` element with an image has an empty [accessible name][]. The image is decorative because it has a `role` [attribute value][] of `none`.

```html
<a href="http://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" role="none"/></a>
```

#### Failed Example 5

This `a` element with an `img` with an empty `title` has an empty [accessible name][].

```html
<a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" title=""/></a>
```

#### Failed Example 4
#### Failed Example 6

This `a` element with an `img` with an `aria-labelledby` has an empty [accessible name][].

Expand All @@ -208,15 +224,15 @@ This `a` element with an `img` with an `aria-labelledby` has an empty [accessibl
<div id="id1"></div>
```

#### Failed Example 5
#### Failed Example 7

This `a` element with an `img` with an `aria-labelledby` referencing a non-existing id has an empty [accessible name][].

```html
<a href="https://www.w3.org/WAI"><img src="/test-assets/shared/w3c-logo.png" aria-labelledby="id1"/></a>
```

#### Failed Example 6
#### Failed Example 8

This `a` element placed off screen has an empty [accessible name][].

Expand All @@ -226,15 +242,7 @@ This `a` element placed off screen has an empty [accessible name][].
</a>
```

#### Failed Example 7

This `a` element has an empty [accessible name][].

```html
<a href="https://www.w3.org/WAI"></a>
```

#### Failed Example 8
#### Failed Example 9

This `area` element has a [semantic role][] of `link` and an empty [accessible name][].

Expand All @@ -246,7 +254,7 @@ This `area` element has a [semantic role][] of `link` and an empty [accessible n
</map>
```

#### Failed Example 9
#### Failed Example 10

This `a` element has an [explicit role][] of `none`. However, it is [focusable][] (by default). Thus it has a [semantic role][] of `link` due to [Presentational Roles Conflict Resolution][]. It has an empty [accessible name][].

Expand Down Expand Up @@ -314,3 +322,4 @@ This `a` element does not have the role of link because it does not have an `hre
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree'
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[semantic role]: #semantic-role 'Definition of Semantic Role'
[attribute value]: #attribute-value 'Definition of Attribute value'