Skip to content

Commit 1db4aaf

Browse files
kengdojJym77
andauthored
Update visible-label-in-accessible-name-2ee8b8.md (#2101)
* 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 <jym@siteimprove.com>
1 parent bb7e4c5 commit 1db4aaf

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This rule applies to any element for which all the following is true:
3838

3939
## Expectation
4040

41-
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.
41+
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.
4242

4343
## Assumptions
4444

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

9898
#### Passed Example 5
9999

100-
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][].
100+
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.
101101

102102
```html
103-
<button aria-label="close">X</button>
103+
<button aria-label="anything">X</button>
104104
```
105105

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

146+
#### Failed Example 4
147+
148+
This link has [visible][] text does not match the [accessible name][] because there is a hyphen in the accessible name.
149+
150+
```html
151+
<a href="#" aria-label="non-standard">nonstandard</a>
152+
```
153+
154+
#### Failed Example 5
155+
156+
This link has [visible][] text does not match the [accessible name][] because there are extra spaces in the accessible name.
157+
158+
```html
159+
<a aria-label="1 2 3. 4 5 6. 7 8 9 0" href="tel:1234567890">123.456.7890</a>
160+
```
161+
146162
### Inapplicable
147163

148164
#### Inapplicable Example 1
@@ -181,6 +197,7 @@ This link has no [visible text content][].
181197
```
182198

183199
[accessible name]: #accessible-name 'Definition of accessible name'
200+
[match characters]: #matching-characters 'Definition of matching characters'
184201
[non-text content]: https://www.w3.org/TR/WCAG21/#dfn-non-text-content 'WCAG Definition of Non-text content'
185202
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
186203
[semantic role]: #semantic-role 'Definition of Semantic role'

0 commit comments

Comments
 (0)