Skip to content

Consider accessible description in the rules that use link context (5effbb, fd3a94) #1845

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

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

carlosapaduarte
Copy link
Member

Update rules that use link context to consider the title attribute. Although the original resolution in #1766 requested the changes to be made on the "Programmatically Determined Link Context" definition, given that this specifies a set of elements, it does not seem doable. As an alternative, I've added the accessible description to the expectation of "Link in context is descriptive" and to the applicability of "Links with identical accessible names and context serve equivalent purpose"

Closes issue(s):

Need for Call for Review:
This will require a 2 weeks Call for Review


How to Review And Approve

  • Go to the “Files changed” tab
  • Here you will have the option to leave comments on different lines.
  • Once the review is completed, find the “Review changes” button in the top right, select “Approve” (if you are really confident in the rule) or "Request changes" and click “Submit review”.
  • Make sure to also review the proposed Call for Review period. In case of disagreement, the longer period wins.

@carlosapaduarte carlosapaduarte added Rule Update Use this label for an existing rule that is being updated reviewers wanted labels May 13, 2022
@carlosapaduarte carlosapaduarte self-assigned this May 13, 2022
Copy link
Collaborator

@Jym77 Jym77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it would be cleaner to remove aria-describedby from "Programmatically determined link context". Since the rules now explicitly mention the accessible description, that already includes aria-describedby references (and actually a few more things such as children of aria-describedby references, if I get the accessible name computation correctly).

So, the PDLC would be some set of elements defined by some DOM tree relationship, and rules about context would look at PDLC + accessible description.
(it would also means that aria-describedby="foo bar" and aria-describedby="bar foo" would be considered as different accessible descriptions while they are currently the same PDLC, which sounds bad)

@WilcoFiers WilcoFiers requested review from WilcoFiers and kengdoj May 19, 2022 13:16
Copy link
Collaborator

@kengdoj kengdoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions made.

@@ -77,7 +78,7 @@ This rule is designed specifically for [2.4.4 Link Purpose (In Context)][sc244],

#### Passed Example 1

These two HTML `a` elements have the same [accessible name][] and [context][programmatically determined link context] and link to the [same resource][].
These two HTML `a` elements have the same [accessible name][], [accessible description][] and [context][programmatically determined link context] and link to the [same resource][].
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be helpful to say "same non-empty accessible name, empty accessible description..."?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it in a couple other spots.

Copy link
Member

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like Kathy's suggestions on these, would like to see them made.

@carlosapaduarte
Copy link
Member Author

I feel it would be cleaner to remove aria-describedby from "Programmatically determined link context". Since the rules now explicitly mention the accessible description, that already includes aria-describedby references (and actually a few more things such as children of aria-describedby references, if I get the accessible name computation correctly).

So, the PDLC would be some set of elements defined by some DOM tree relationship, and rules about context would look at PDLC + accessible description. (it would also means that aria-describedby="foo bar" and aria-describedby="bar foo" would be considered as different accessible descriptions while they are currently the same PDLC, which sounds bad)

Good suggestion. I'm updating the definition accordingly.

carlosapaduarte and others added 2 commits June 6, 2022 09:50
…-purpose-fd3a94.md

Co-authored-by: Kathy Eng <kengdoj@users.noreply.github.com>
…-purpose-fd3a94.md

Co-authored-by: Kathy Eng <kengdoj@users.noreply.github.com>
@carlosapaduarte carlosapaduarte requested a review from kengdoj June 6, 2022 08:50
@Jym77 Jym77 changed the title Consider the title attribute in the rules that use link context (5effbb, fd3a94) Consider accessible description in the rules that use link context (5effbb, fd3a94) Jun 9, 2022
Jym77
Jym77 previously requested changes Jun 9, 2022
@@ -337,6 +347,7 @@ This `a` element is not a [semantic][semantic role] `link`, because it has no `h
```

[accessible name]: #accessible-name 'Definition of Accessible Name'
[accessible description]: https://www.w3.org/TR/wai-aria-1.2/#dfn-accessible-description 'Definition of accessible description'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have our own def of it (like for accessible name?), I'm notably thinking we should link it to the "accessible name and description computation" document.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a definition of accessible description

@dan-tripp-siteimprove
Copy link
Collaborator

One tip to improve the workflow: you can propose changes when reviewing by activating the icon with a plus and a minus sign. That will copy the line to the comment window, and if you change that line, then a change proposal is displayed. That is easier for the reviewer, that does not need to copy paste content, but also for the author that can approve the proposal to include it the pull request.

I figured there must be an easier way. Thank you, I've noted it for next time.

Copy link
Collaborator

@kengdoj kengdoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorial changes for consistency

Co-authored-by: Kathy Eng <kengdoj@users.noreply.github.com>
@@ -35,7 +35,7 @@ This rule applies to any [inheriting semantic][] `link` for which all the follow

## Expectation

The [accessible name][] of each target element together with its [programmatically determined link context][] describes the purpose of the link.
The [accessible name][] of each target element together with its [accessible description][] and [programmatically determined link context][] describes the purpose of the link.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is obviously correct. The SC talks about link text and programmatically determined context. Its probably worth putting in the assumption that we're using "link text" from WCAG to mean accessible name and description. Links that fail label in name could have visible text that isn't considered "link text" in this rule. I think that should be in the assumption.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

@HelenBurge HelenBurge requested a review from Jym77 May 29, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviewers wanted Rule Update Use this label for an existing rule that is being updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should rules about link's name (b20e66, 5effbb, aizyf1, fd3a94) consider the title attribute?
7 participants