Skip to content

Commit

Permalink
Update visible-label-in-accessible-name-2ee8b8.md (#2101)
Browse files Browse the repository at this point in the history
* Update visible-label-in-accessible-name-2ee8b8.md

* Update visible-label-in-accessible-name-2ee8b8.md

* Update visible-label-in-accessible-name-2ee8b8.md

* Update _rules/visible-label-in-accessible-name-2ee8b8.md

* Update _rules/visible-label-in-accessible-name-2ee8b8.md

* Update _rules/visible-label-in-accessible-name-2ee8b8.md

* Update visible-label-in-accessible-name-2ee8b8.md

add matching characters from act rules glossary

* Update _rules/visible-label-in-accessible-name-2ee8b8.md

---------

Co-authored-by: Jean-Yves Moyen <[email protected]>
  • Loading branch information
kengdoj and Jym77 authored Jan 11, 2024
1 parent bb7e4c5 commit 1db4aaf
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions _rules/visible-label-in-accessible-name-2ee8b8.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This rule applies to any element for which all the following is true:

## Expectation

For each target element, all [text nodes][] in the [visible text content][] either match or are contained within the [accessible name][] of this target element, except for characters in the [text nodes][] used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored.
For each target element, all [text nodes][] in the [visible text content][] [match characters][] and are contained within the [accessible name][] of this target element, except for characters in the [text nodes][] used to express [non-text content][]. Leading and trailing [whitespace][] and difference in case sensitivity should be ignored.

## Assumptions

Expand Down Expand Up @@ -97,10 +97,10 @@ This button has [visible][] text that is contained within the [accessible name][

#### Passed Example 5

This button has [visible][] text that does not need to be contained within the [accessible name][], because the "x" text node is [non-text content][].
This button has [visible][] text that does not need to be contained within the [accessible name][], because the "x" text node is [non-text content][]. Note: this would need to meet SC 1.1.1 Non text content.

```html
<button aria-label="close">X</button>
<button aria-label="anything">X</button>
```

#### Passed Example 6
Expand Down Expand Up @@ -143,6 +143,22 @@ This link has [visible][] text with mathematical symbols, that does not match th
<a href="/" aria-label="Proof of two multiplied by two is four">Proof of 2&times;2=4</a>
```

#### Failed Example 4

This link has [visible][] text does not match the [accessible name][] because there is a hyphen in the accessible name.

```html
<a href="#" aria-label="non-standard">nonstandard</a>
```

#### Failed Example 5

This link has [visible][] text does not match the [accessible name][] because there are extra spaces in the accessible name.

```html
<a aria-label="1 2 3. 4 5 6. 7 8 9 0" href="tel:1234567890">123.456.7890</a>
```

### Inapplicable

#### Inapplicable Example 1
Expand Down Expand Up @@ -181,6 +197,7 @@ This link has no [visible text content][].
```

[accessible name]: #accessible-name 'Definition of accessible name'
[match characters]: #matching-characters 'Definition of matching characters'
[non-text content]: https://www.w3.org/TR/WCAG21/#dfn-non-text-content 'WCAG Definition of Non-text content'
[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'
Expand Down

0 comments on commit 1db4aaf

Please sign in to comment.