Skip to content

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 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

@@ -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

CLAassistant commented Feb 6, 2025

CLA assistant check
All committers have signed the CLA.

@HelenBurge HelenBurge requested a review from Jym77 May 29, 2025 14:20
@HelenBurge HelenBurge removed request for Jym77 and tbostic32 June 12, 2025 14:37
@carlosapaduarte
Copy link
Member Author

Closing and reopening to trigger checks

Copy link

netlify bot commented Jun 12, 2025

Deploy Preview for act-rules ready!

Name Link
🔨 Latest commit 618edff
🔍 Latest deploy log https://app.netlify.com/projects/act-rules/deploys/685d6812aae365000840d34e
😎 Deploy Preview https://deploy-preview-1845--act-rules.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@carlosapaduarte
Copy link
Member Author

Call for review ends July 10

@HelenBurge HelenBurge added Review call 2 weeks Call for review for new rules and big changes and removed reviewers wanted labels Jul 7, 2025

For native markup languages, such as HTML and SVG, additional information on how to calculate the accessible description can be found in [HTML Accessibility API Mappings 1.0, Accessible Name and Description Computation (working draft)](https://www.w3.org/TR/html-aam/#accessible-name-and-description-computation) and [SVG Accessibility API Mappings, Name and Description (working draft)](https://www.w3.org/TR/svg-aam/#mapping_additional).

**Note:** As per the [accessible name and description computation][], each element with the 'aria-describedby' property always has an accessible description.
Copy link
Collaborator

@giacomo-petri giacomo-petri Jul 25, 2025

Choose a reason for hiding this comment

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

Suggested change
**Note:** As per the [accessible name and description computation][], each element with the 'aria-describedby' property always has an accessible description.
**Note:** As per the [accessible name and description computation][], each element with the 'aria-describedby' property pointing to an existing element which content is not the empty string, always has an accessible description.

@@ -220,7 +221,7 @@ These two SVG `a` and HTML `a` elements have the same [accessible name][], same

#### Passed Example 9

These two HTML `a` elements have the same [accessible name][] and [context][programmatically determined link context], but resolve to different resources. However, the purpose of these links is [ambiguous to users in general](https://www.w3.org/TR/WCAG22/#dfn-ambiguous-to-users-in-general). Thus all readers are unsure about the destination and the person with a disability is not at any disadvantage.
These two HTML `a` elements have the same [accessible name][], the same [accessible description][], and the same [context][programmatically determined link context], but go to different resources. However, there is no visual information to let users know that both links resolve to non-equivalent resources.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Starting with this example, we began using "the same accessible description", whereas in previous cases we used "empty accessible description". I recommend maintaining consistency throughout. It might also be helpful to include examples that uses title or aria-describedby attributes both in passed and failed for comparison.

@@ -40,9 +40,10 @@ 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
- the elements have the same [programmatically determined link context][].
- the elements have [matching][] [accessible descriptions][accessible description]; and
- have the same [programmatically determined link context][].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- have the same [programmatically determined link context][].
- the elements have the same [programmatically determined link context][].

consistent with bullets above

@@ -220,7 +221,7 @@ These two SVG `a` and HTML `a` elements have the same [accessible name][], same

#### Passed Example 9

These two HTML `a` elements have the same [accessible name][] and [context][programmatically determined link context], but resolve to different resources. However, the purpose of these links is [ambiguous to users in general](https://www.w3.org/TR/WCAG22/#dfn-ambiguous-to-users-in-general). Thus all readers are unsure about the destination and the person with a disability is not at any disadvantage.
These two HTML `a` elements have the same [accessible name][], the same [accessible description][], and the same [context][programmatically determined link context], but go to different resources. However, there is no visual information to let users know that both links resolve to non-equivalent resources.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
These two HTML `a` elements have the same [accessible name][], the same [accessible description][], and the same [context][programmatically determined link context], but go to different resources. However, there is no visual information to let users know that both links resolve to non-equivalent resources.
These two HTML `a` elements have the same [accessible name][], empty [accessible description][], and the same [context][programmatically determined link context], but go to different resources. However, there is no visual information to let users know that both links resolve to non-equivalent resources.

@@ -84,7 +85,7 @@ There are no accessibility support issues known.

#### 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 non-empty [accessible name][], empty [accessible description][], the same [context][programmatically determined link context], and resolve to the [same resource][].
Copy link
Member

Choose a reason for hiding this comment

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

I think these texts are gettin pretty verbose. Not a blocker if people prefer this language, but I would suggest this:

Suggested change
These two HTML `a` elements have the same non-empty [accessible name][], empty [accessible description][], the same [context][programmatically determined link context], and resolve to the [same resource][].
These two links with the same [name][]accessible name], [description][]accessible description] and [context][programmatically determined link context] resolve to the [same resource][].

The same for other example descriptions.

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.

There are a couple editorial suggestions to consider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review call 2 weeks Call for review for new rules and big changes 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?
8 participants