-
Notifications
You must be signed in to change notification settings - Fork 75
Update visible-label-in-accessible-name-2ee8b8.md #2101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
0267d32
ffd53a2
c929457
9590ae3
f19e9eb
b4d18a5
d1b8f91
818d342
3401bfb
3add10e
f3f701b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we keep the "Close" label, which makes this pass 1.1.1? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the Expectation says
there is no expectation, and this example passes. I used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comes up often around here: when passed examples fail something else. I like it best when there is a note on the passed example which documents that "something else". In this case that note could be: "This example passes the rule and will fail SC 1.1.1". We could call these "curve ball passed examples". To have examples like these, and to document them as such, meets two goals, both important:
Jean-Yves did this a lot in the examples for his recent PR 2084:
I think it's a good thing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This works, but perhaps a cleaner way to handle this would be to modify the second condition of the applicability to filter out not just non-visible text content, but also non-text content. That would cause this example to move to the non-applicable section. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree, Tom. But, Applicability has to be objective at this time, so the except non-text content part is under the Expectation section for now. |
||
``` | ||
|
||
#### Passed Example 6 | ||
|
@@ -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×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="Call 1 2 3. 4 5 6. 7 8 9 0." href="tel:1234567890">123.456.7890</a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was the inclusion of a full stop at the end of the aria-label attribute value deliberate? If so, do we need to provide clarification regarding its potential impact on the outcome? In the issue description only extra spaces are mentioned. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! I edited the aria-label.
kengdoj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
### Inapplicable | ||
|
||
#### Inapplicable Example 1 | ||
|
@@ -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' | ||
|
Uh oh!
There was an error while loading. Please reload this page.