You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _rules/visible-label-in-accessible-name-2ee8b8.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,16 +52,15 @@ The understanding document of [2.5.3 Label in Name][understand253] use the term
52
52
53
53
If the target element contains an [image of text](https://www.w3.org/TR/WCAG22/#label-in-name), it may pass this rule but fail [2.5.3 Label in Name][understand253] (because the accessible name should then match the text inside the image, which is not taken into account by this rule). So further testing is needed. This case might be handled by a different rule in the future.
54
54
55
-
56
55
### Assumptions
57
56
58
-
This rule assumes that the [visible inner text][] is equal to the [label as defined by WCAG][(https://www.w3.org/wai/wcag22/understanding/label-in-name#dfn-label), even though "label" is not precisely defined at this point in history.
57
+
This rule assumes that the [visible inner text][] is equal to the [label as defined by WCAG](https://www.w3.org/wai/wcag22/understanding/label-in-name#dfn-label), even though "label" is not precisely defined at this point in history.
59
58
60
59
This rule assumes that the visible label isn't rearranged with CSS so that it appears to the user in a different order than it appears in the DOM.
61
60
62
61
This rule assumes that the visible label doesn't use CSS to add whitespace where none exists in the DOM.
63
62
64
-
This rule - specifically, the [label in name algorithm][] that this rule relies on - assumes that content within parentheses can be ignored. ("Parentheses" are also known as "round brackets".) This is important becuase the algorithm's treatment of parentheses is to remove them and all characters within them. This assumption is almost always true in English. Exceptions include links with names such "Dune (1984 film)" and "Dune (2021 film)". This assumption is known to be often false in languages other than English, such as German (where parentheses indicate dual states) and Arabic (where parentheses are often used as quotation marks). Violations of this assumption will, in real-world scenarios, more often result in a false negative for this rule rather than a false positive.
63
+
This rule - specifically, the [label in name algorithm][] that this rule relies on - assumes that content within parentheses can be ignored. ("Parentheses" are also known as "round brackets".) This is important because the algorithm's treatment of parentheses is to remove them and all characters within them. This assumption is almost always true in English. Exceptions include links with names such "Dune (1984 film)" and "Dune (2021 film)". This assumption is known to be often false in languages other than English, such as German (where parentheses indicate dual states) and Arabic (where parentheses are often used as quotation marks). Violations of this assumption will, in real-world scenarios, more often result in a false negative for this rule rather than a false positive.
65
64
66
65
### Accessibility Support
67
66
@@ -143,8 +142,7 @@ This button has [visible inner text][] that, according to the [label in name alg
143
142
144
143
#### Passed Example 8
145
144
146
-
(Similar to previous example.) This link has [visible inner text][] that, according to the [label in name algorithm][], is contained within the [accessible name][]. This example shows why the [label in name algorithm][] uses the [visible inner text][] and not the [visible text content][]: the `<h6>` tags insert whitespace into the result in the former but not the latter.
147
-
145
+
(Similar to previous example.) This link has [visible inner text][] that, according to the [label in name algorithm][], is contained within the [accessible name][]. This example shows why the [label in name algorithm][] uses the [visible inner text][] and not the [visible text content][]: the `<h6>` tags insert whitespace into the result in the former but not the latter.
148
146
149
147
```html
150
148
<ahref="#"aria-label="Some article by John Doe">
@@ -159,7 +157,9 @@ The [visible inner text][] of this link is "ACT" (with no spaces) because of the
@@ -353,7 +353,7 @@ This rule has no special handling for converting digits into words, or vice vers
353
353
354
354
#### Failed Example 15
355
355
356
-
The [label in name algorithm][] works on full words. That is: it requires that each full word in the visible label ("1" in this case) is equal to a full word in the accessible name ("1a" in this case). Those two words - "1" and "1a" - are not equal, so this element fails the rule.
356
+
The [label in name algorithm][] works on full words. That is: it requires that each full word in the visible label ("1" in this case) is equal to a full word in the accessible name ("1a" in this case). Those two words - "1" and "1a" - are not equal, so this element fails the rule.
357
357
358
358
```html
359
359
<aaria-label="1a"href="#">1</a>
@@ -414,7 +414,7 @@ This link's label contains an abbreviation, so it is not applicable.
414
414
415
415
#### Inapplicable Example 6
416
416
417
-
This word - non-standard / nonstandard - appears in both the element's accessible name and its visible label, using different hyphenation. So it's not applicable.
417
+
This word - non-standard / nonstandard - appears in both the element's accessible name and its visible label, using different hyphenation. So it's not applicable.
0 commit comments