-
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 Links with identical accessible names and context serve equivalent purpose rule #2007
Conversation
…cal-names-and-context-serve-equivalent-purpose-patch-1
Just reviewed Carlos' feedback here #1999 (comment). I'll update it asap. |
@carlosapaduarte, updated per your request in #1999 (comment). Ready for review |
TODO: create very simple static demo pages for failed examples that reflect the link acc name (Contact Us). Note: we still need to update the context definition to handle scenarios where the meaning of the sentence make the purpose of the link clear without ambiguity (with a different PR?). e.g. Punctuation might be covered by the note I've added in "ambiguous to users in general" definition, but link might be enough meaningful and distinguishable within its context also without punctuation. |
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.
Nice work, but some issues still left to address
Feel free to add yourself to the list of authors of this rule
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
@@ -16,6 +16,8 @@ The _programmatically determined context_ of a link (or _programmatically determ | |||
- being a header cell [assigned][] to the closest [ancestor][] of the link in the [flat tree][] that has a [semantic role][] of `cell` or `gridcell`; or | |||
- being referenced by an `aria-describedby` attribute of the link. | |||
|
|||
**Note**: Since screen readers interpret punctuation, they can also provide the context from the current sentence, when the focus is on a link in that sentence. |
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.
I'm not sure why you added this note to the definition. Why is mentioning the sentence relevant here?
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.
Per my previous content
Note: we still need to update the context definition to handle scenarios where the meaning of the sentence make the purpose of the link clear without ambiguity (with a different PR?).
e.g.
<div><a href="#">contact us</a> via chat, or <a href="#">contact us</a> via email.</div>
Punctuation might be covered by the note I've added in "ambiguous to users in general" definition, but link might be enough meaningful and distinguishable within its context also without punctuation.
I was trying to partially address the example provided, but I understand that as is, it is only more confusing. I remove it but I think we should address it in a separate PR.
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Carlos Duarte <carlosapaduarte@gmail.com>
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.
I think that would work 💯
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
…-purpose-fd3a94.md Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
@@ -42,7 +42,8 @@ This rule applies to any set of two or more [HTML or SVG elements][] for which a | |||
- the elements are in the same [web page (HTML)][]; and | |||
- the elements are [included in the accessibility tree][included in the accessibility tree]; and | |||
- the elements have [matching][] [accessible names][accessible name] that are not empty (`""`); and | |||
- have the same [programmatically determined link context][]. | |||
- the elements have the same [programmatically determined link context][]; and | |||
- the purpose of the elements is not [ambiguous to users in general](https://www.w3.org/TR/WCAG21/#dfn-ambiguous-to-users-in-general). |
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.
I'm having second thoughts about this. The definition is
the purpose cannot be determined from the link and all information of the Web page presented to the user simultaneously with the link
I don't think this is objective. I agree it is unambiguous, so we might rewrite the rule in a way that moves this condition from the applicability to the expectation (and update the examples accordingly).
What do you think?
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.
I agree, even more considering that the definition of "ambiguous to users in general" is far away from our definition of "programmatically determined link context".
On it
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.
My suggestion would be to update the current expectation to something like
For the links in each set of target elements, one of the following is true:
- The links are not ambiguous to users in general and, when followed, resolve to the [same resource][] or to equivalent resources; or
- The links are ambiguous to users in general
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 we don't even need the exception in the first bullet:
either
- the links resolve to the same resource; or
- the links are ambiguous
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.
- Links not ambiguous to users in general has been removed from Applicability
- Added expectation as per suggestions
- Slightly changed the background note about ambiguous links to reflect new applicability
- Moved Inapplicable example n.8 to passed example 9 (changing a bit the description).
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
wcag20:1.1.1: # Non-text Content (A) | ||
secondary: This success criterion is mapped as a Secondary requirement because the SC applies only to non-text content. When links have visual information as context, a failed outcome for this rule may result in SC 1.1.1 Non-text Content being not satisfied. | ||
wcag20:1.3.1: # Info and Relationships (A) | ||
secondary: This success criterion is mapped as a Secondary requirement because the SC applies to information and relationships conveyed through presentation. When links rely on visual cues for conveying information and/or relationships, and these cues are not programmatically determined or available in text, a failed outcome for this rule may result in SC 1.3.1 Info and Relationships being not satisfied. |
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 should follow the format for secondary requirements. Please have a look at the design doc.
<a href="/test-assets/links-with-identical-names-serve-equivalent-purpose-b20e66/contact-us.html?page=1" style="display:inline-block; background: url(/test-assets/shared/chat.png) 0 / 40px no-repeat; padding: 20px 0 20px 50px;">Contact Us</a> | ||
<a href="/test-assets/links-with-identical-names-serve-equivalent-purpose-b20e66/contact-us.html?page=2" style="display:inline-block; background: url(/test-assets/shared/phone.png) 0 / 40px no-repeat; padding: 20px 0 20px 50px; margin-left: 40px;">Contact Us</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.
I don't think this needs to be an HTML page that changes based on the query string. Actually having two HTML files would be better. There is nothing in this rule that requires a tester to compare the query string of two resources. So having an example that checks that you do that feels to me like a disconnect between what we say needs to be tested, and how we in practice want people to test.
I don't think these examples are wrong, but they're not quite right either. They have a complexity to them which they either don't need, or which hint that we don't think this rule is tested in the way we say it is. Neither of which is quite right I think.
@@ -16,13 +16,18 @@ accessibility_requirements: | |||
failed: not satisfied | |||
passed: further testing needed | |||
inapplicable: further testing needed | |||
wcag20:1.1.1: # Non-text Content (A) | |||
secondary: true | |||
wcag20:1.3.1: # Info and Relationships (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.
I don't think this needs to have 1.3.1 / 1.1.1 in here any more than the link has accessible name rule does. Sure if 1.1.1 fails you might also fail 2.4.4 but it's entirely possible to for an image with a link in it to pass 1.1.1 and fail 2.4.4 and vice versa. That's not the case for something like an image button which always fails both 1.1.1 and 4.1.2, or something like a 2:1 text contrast which always fails both 1.4.3 and 1.4.5.
Rule of thumb here is if you can separate them, it's not a secondary requirement. There has to be some element for which its not possible to fail one without failing the other SC, or to pass one without passing the other.
@@ -229,80 +243,124 @@ These two HTML `a` elements have the same [accessible name][] and [context][prog | |||
</html> | |||
``` | |||
|
|||
### Failed | |||
|
|||
#### Failed Example 1 |
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.
I don't mind having one or two examples of images in here. I don't think the examples should be exclusively about images. The far more common scenario is with just link text. I think the examples we had before did a better job of demonstrating that problem than the new examples do.
I will promptly go through all the feedback. Regarding your specific point:
It's worth noting that the earlier examples posed a challenge for users in general, which is an exception for the 2.4.4 criterion evaluation. Honestly, I never seen an example of a couple of links with identical accessible names and context serving different purposes without being ambiguous to users in general, except for the ones where something visual (background, icon, image) is making clear the difference. |
Only query parameters topic is left out (pending agenda), then we should be ready to go for the call for review :D |
…and-context-serve-equivalent-purpose-patch-1
…and-context-serve-equivalent-purpose-patch-1
…and-context-serve-equivalent-purpose-patch-1
Call for Review ends on February 23rd. |
…and-context-serve-equivalent-purpose-patch-1
Carlos Duarte seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
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.
Links to WCAG 2.1 need to be updated. This doesn't block the Call for Review but does block merging.
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md
Outdated
Show resolved
Hide resolved
…-purpose-fd3a94.md Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
…-purpose-fd3a94.md Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
…-purpose-fd3a94.md Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
…and-context-serve-equivalent-purpose-patch-1
this seems to be ready to merge. |
Call for review has ended, merging. |
…and-context-serve-equivalent-purpose-patch-1
Our current failed scenarios are ambiguous to users in general, which conflicts with 1st assumption.
With these changes I've:
Closes issue(s): #1999
Need for Call for Review:
This will require a 2 weeks Call for Review
I'm note sure about the timing here as multiple failed cases have been updated. I've set 2 weeks but feel free to update if needed.
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