-
Notifications
You must be signed in to change notification settings - Fork 70
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
Update visible-label-in-accessible-name-2ee8b8.md #2101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do the changes relate to #2075?
|
||
```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 comment
The 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?
(assuming this is indeed a close button)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the Expectation says
except for characters in the [text nodes][] used to express [non-text content][]
there is no expectation, and this example passes. I used aria-label="anything"
to make it clear that really any description would pass this rule. But, you are right that SC 1.1.1 would then be not satisfied. But I'd like to consider SC 1.1.1 being secondary and handle that in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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:
- It emphasizes why the example passes the rule. (In this case: "to make it clear that really any description would pass this rule", as Kathy put it). I think that this aids understanding, a lot.
- It tells everyone that even though this is a "passed example" for this rule, it's not a good example overall, so no one should copy and paste the code.
Jean-Yves did this a lot in the examples for his recent PR 2084:
- "Using an explicit role of generic for any element is globally not recommended, but not an error by itself."
- "Using an explicit role which is the same as the implicit role is not recommended, but not an error by itself."
- "The btn token is not a valid role and is therefore ignored."
- "Even though the alert role is not allowed, the first token is a valid role and is therefore used."
I think it's a good thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The 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.
|
||
```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 comment
The 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:
- It emphasizes why the example passes the rule. (In this case: "to make it clear that really any description would pass this rule", as Kathy put it). I think that this aids understanding, a lot.
- It tells everyone that even though this is a "passed example" for this rule, it's not a good example overall, so no one should copy and paste the code.
Jean-Yves did this a lot in the examples for his recent PR 2084:
- "Using an explicit role of generic for any element is globally not recommended, but not an error by itself."
- "Using an explicit role which is the same as the implicit role is not recommended, but not an error by itself."
- "The btn token is not a valid role and is therefore ignored."
- "Even though the alert role is not allowed, the first token is a valid role and is therefore used."
I think it's a good thing
add matching characters from act rules glossary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated rules references the #matching-characters glossary definition which says:
A sequence of characters is considered to match another if, after removing leading and trailing space characters and replacing remaining occurrences of one or more space characters with a single space, the two sequences of characters are equal character-by-character, ignoring any differences in letter casing
The link to https://html.spec.whatwg.org/#white_space in the #matching-characters definition is broken so it's not clear which definition of space characters is intended. The various WHATWG specs have moved to a common definition of ASCII whitespace defined here:
https://infra.spec.whatwg.org/#ascii-whitespace
This is different to the Unicode whitespace definition the rule currently uses:
https://www.w3.org/WAI/standards-guidelines/act/rules/2ee8b8/proposed/#whitespace
Notably ASCII whitespace doesn't include
which would be problematic for this example from @dan-tripp-siteimprove
<a aria-label="compose email" href="#">Compose <br> email</a>
Desired behaviour: pass this rule
Call for Review ends on December 21st. |
Removing from Call for Review as two reviewers were from the same organisation… |
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! I edited the aria-label.
Added a comment regarding Pass 5. It feels to me like this scenario should be considered inapplicable, but that would require a modification to the applicability. The rule is consistent as-is, but it seems more accurate to say that the non-text content scenario is not applicable to this rule rather than to say that it passes it... |
- being more specific with regards to whitespace and . as per dd8's comment at act-rules#2101 (review) - misc. other edits.
Update examples to include #1458 (comment)
Closes issue(s):
Need for Call for Review:
This will require a 2 weeks Call for Review << new rule, or substantial changes affecting a large number of test cases, if in doubt, use this. >>
Pull Request Etiquette
When creating PR:
develop
branch (left side).After creating PR:
Rule
,Definition
orChore
.When merging a PR:
How to Review And Approve