Skip to content

Conversation

@annethyme
Copy link
Collaborator

<< Describe the changes >>

Closes issue: #210

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Make sure you requesting to pull a issue/feature/bugfix branch (right side) to the master branch (left side).
  • Make sure the pull request is prefixed with Rule: or Algorithm: or Chore: based on work involved.

How to Review And Approve

  • Go to the “files changed” tab, there 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” and click “Submit review”.

@ShadowBB
Copy link
Collaborator

This looks very good. I will approve as soon as I can verify the test assets.

@annethyme annethyme self-assigned this Aug 27, 2018

The rule applies to any two or more HTML or SVG elements that have the [semantic role](#semantic-role) of link, are [exposed to assistive technologies](#exposed-to-assistive-technologies) and that have the same [accessible name](#accessible-name).

**Note:** Leading and trailing whitespace and difference in case sensitivity should be ignored when deciding whether the [accessible names](#accessible-name) are the same.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to be implementation detail and may be it is best if it lived within the definition of accessible name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Put into seperate PR since other rules are also relying on the definition: #254


### Expectation

For each set of target elements, activating the links resolves, after any redirects, to resources that fulfil the same purpose in relation to the purpose indicated by the [accessible names](#accessible-name) of the link.
Copy link
Collaborator

Choose a reason for hiding this comment

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

activating the links resolves is not simple to understand, also there are multiple breaks in this sentence.

How about:
Each target element resolves to resources .....

I believe resolve inherently tackles redirect

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Applicability rewritten and redirect guidance split out into a note.

* contain different amounts of information and/or differently worded information
* are using different layouts.

**Note:** If the same content is presented in different formats, the format itself is often part of the link purpose, e.g. an article as both HTML and PDF.
Copy link
Collaborator

Choose a reason for hiding this comment

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

if the format of the resulting page is different, the links would be ideally different, and can be ignored for the rule itself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With the direction this rule is taking, it should be evaluated if the purpose is actually the same...

Copy link
Member

Choose a reason for hiding this comment

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

I don't really understand what is the purpose of this note, or how it would help interpret the rule


## Assumptions

* This rule assumes that the purpose of the links for links with identical link texts would not be ambiguous to users in general, which is the exception mentioned in the success criterion 2.4.9 Link Purpose (Link Only).
Copy link
Collaborator

Choose a reason for hiding this comment

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

A link to SC2.4.9 in the background can be beneficial.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's already a link in the Background, but now also a link here

@@ -0,0 +1,12 @@
<!DOCTYPE html>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ideally these file names are prefixed with the relevant SC, and not with in nested folders.

In this case, it could be

test-assets/SC2-4-9-rule-name-my-test-asset-file.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@JKODU, can we create some guidance on this? And maybe a clean-up... I just had a look in the folder and tried to copy what I saw.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thinking further about it, wouldn't it make sense that each rule had it's own folder for test assets, where the folder name is the same as the rule name?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We reached a consensus on this in a previous meeting.

jeeyyy
jeeyyy previously requested changes Sep 4, 2018
Copy link
Collaborator

@jeeyyy jeeyyy left a comment

Choose a reason for hiding this comment

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

See comments.

@annethyme annethyme changed the title Rule: SC2-4-9-links-with-identical-accessible-names-have-same-purpose.md SC2-4-9-links-with-identical-accessible-names-have-same-purpose Sep 10, 2018
@annethyme annethyme added the Rule Use this label for a new rule that does not exist already label Sep 10, 2018
annethyme pushed a commit that referenced this pull request Sep 14, 2018
Adding new paragraph on comparing acc names, that has so far been note in these rules: 
https://auto-wcag.github.io/auto-wcag/rules/SC2-5-3-label-content-name-mismatch.html
#220
#251
@annethyme annethyme dismissed jeeyyy’s stale review September 14, 2018 19:55

We still need to discuss test assets, but can you review the rest again?

@annethyme
Copy link
Collaborator Author

Test assets still missing, while waiting for decision on test asset folder structure and naming conventions.

Please do review the rest in the meantime.

@ShadowBB
Copy link
Collaborator

Will you make a separate pull requests of the test assets later? I'll approve this.

ShadowBB
ShadowBB previously approved these changes Sep 18, 2018
@annethyme annethyme requested a review from nitedog September 24, 2018 09:16
@jeeyyy jeeyyy mentioned this pull request Sep 24, 2018
@jeeyyy
Copy link
Collaborator

jeeyyy commented Sep 24, 2018

@nitedog please review


**Note:** If the same content is presented in different formats, the format itself is often part of the link purpose, e.g. an article as both HTML and PDF.

**Note:** If the [normalized](#url-normalisation) value of the ´href´ is identical, the resources are identical, thus fulfilling the same purpose. [Relative URLs](https://www.w3.org/TR/WD-html40-970917/htmlweb.html#relative-urls) first need to be resolved to full URLs before doing the comparison.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is referring to a Working Draft of HTML4. Is there a comparable reference in HTML5?


## Assumptions

* This rule assumes that the purpose of the links for links with identical link texts would not be ambiguous to users in general, which is the exception mentioned in [Understanding Success Criterion 2.4.9: Link Purpose (Link Only)](https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-link-only.html).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I recommend removing the second half of the sentence "which is the exception ...". The rule already refers to SC 2.4.9 which spells out this exception. Adding another link to the Understanding document is superfluous and also adds potential maintenance overhead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Separately from the above, is it usual to have such aspects of the requirement in the assumptions section? Seems a little odd to me. I would expect this to be part of this or another rule rather than as an assumption.

@jeeyyy jeeyyy changed the base branch from master to develop April 12, 2019 11:39
_rules/6cbcbe.md Outdated
Links created via scripting with explicit role of link, but leads to the same resource:

```html
<span role="link"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know that is not the point, but can we just add tabindex="0" to every span with role="link" :-)

Otherwise, the test case won't be keyboard usable (and since it's not the point of the test, I think it's a little damaging)

Copy link
Collaborator

@audreymaniez audreymaniez left a comment

Choose a reason for hiding this comment

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

What a great job, really well documented 👏
I'm just questionning the expectation about the instant redirection.

_rules/6cbcbe.md Outdated
### Expectation

When followed, the links in each set of target elements resolve to the [same resource](#same-resource) or to [equivalent resources](#equivalent-purpose).
Resolving the links includes potential redirects, if the redirects happen instantly.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm interesting in understanding how a redirection that is not instant can impact the evaluation of how the ressources are the same or not ?

I see the discussion here, and I think it's fair on a user impact side, but i would failed the redirection itself with SC 3.2.5 not on link purpose.

Copy link
Contributor

Choose a reason for hiding this comment

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

Continuing from that example, if /foo/b.html redirects to /foo/a.html after 10 seconds, a user would actually get to experience and possibly interact with /foo/b.html before being redirected to /foo/a.html. As such, /foo/b.html is experienced as distinct from /foo/a.html and the two are therefore clearly not the same resource. If, on the other hand, /foo/b.html redirects instantly to /foo/a.html, the two are experienced as the same resource, namely /foo/a.html.

I absolutely agree that such a delayed redirect should fail the WCAG, but that is not the concern of this rule. As you point out, it would also fail this rule which may or may not be appropriate; I don't know enough about the WCAG to have an opinion on that though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you @kasperisager for the explanation.

@WilcoFiers your comments on putting it as a note means that the redirection is not to be tested within that rule?


Non-identical resources can still be equivalent by equally complying to the expectation formed by the user when navigating to them, thus serving an equivalent purpose. This would usually involve that the advertised key content is the same.

Web pages and documents (e.g. PDFs, office formats etc.) may fulfil be equivalent resources, even if the resources:
Copy link
Collaborator

Choose a reason for hiding this comment

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

There may be an extra word in this sentence, "may fulfil be equivalent resources".

Copy link
Member

@carlosapaduarte carlosapaduarte left a comment

Choose a reason for hiding this comment

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

Amazing work @annethyme
Just some editorial changes remaining, I believe

_rules/6cbcbe.md Outdated

### Applicability

This rule applies to any set of any two or more HTML or SVG elements that have the [semantic role](#semantic-role) of `link`, or a role that inherits from the `link` role, are [included in the accessibility tree](#included-in-the-accessibility-tree), and that have [matching](#matching-characters) [accessible names](#accessible-name) that does not only consist of [whitespace](#whitespace).
Copy link
Member

Choose a reason for hiding this comment

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

does > do

_rules/6cbcbe.md Outdated

## Assumptions

This rule assumes that the purpose of the links with identical names would not be ambiguous to users in general when seen in context on the web page, as users of assistive technologies in this case is not at a disadvantage when viewing the link out of context, e.g. on a list of links in a screen reader.
Copy link
Member

Choose a reason for hiding this comment

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

The second part of the sentence is not easy to read and understand. Since I'm not sure about what you meant, I'm not able to offer a suggestion :-(

Copy link
Collaborator

@ShadowBB ShadowBB Apr 29, 2019

Choose a reason for hiding this comment

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

EDIT: nvm it is all cleared up now. Approved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From the Understanding document:

The Success Criterion includes an exception for links for which the purpose of the link cannot be determined from the information on the Web page. In this situation, the person with the disability is not at a disadvantage; there is no additional context available to understand the link purpose. However, whatever amount of context is available on the Web page that can be used to interpret the purpose of the link must be made available in the link text to satisfy the Success Criterion.

(https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-link.html)

I will have another look at the wording asap.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ShadowBB

However that makes little sense because if they are not ambiguous when seen in context that doesn't mean that they are clear without context right?

I think the point here is that if I created a page with nothing but a link that reads "Click here", it is not an accessibility issue, and thus not a violation of success criterion 2.4.9, because it gives the same (poor) experience to everyone.
And I guess it doesn't just have to be a poor experience, but could also be game-like or artsy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@carlosapaduarte and @ShadowBB, I gave a shot at a rewrite. Please have a look again.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh! I totally interpreted that the other way around.

You new writeup makes this a lot more clear and I agree with it wholeheartedly now! Nice work!

_rules/6cbcbe.md Outdated

#### Passed example 6

Pages contain different amounts of information and/or differently worded information, but fulfils the same purpose in relation to 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.

fulfils > fulfil

_rules/6cbcbe.md Outdated

#### Passed example 8

Links created via scripting with explicit role of link, but leads 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.

leads > lead

_rules/6cbcbe.md Outdated

#### Failed example 3

Links created via scripting with explicit role of link, but leads to different resources that offer different content:
Copy link
Member

Choose a reason for hiding this comment

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

leads > lead

Additionally, if you drop the first "different" it might improve readability

_rules/6cbcbe.md Outdated

#### Failed example 5

A set of two SVG `<a>` elements have the same accessible name but links to different resources:
Copy link
Member

Choose a reason for hiding this comment

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

links > link

_rules/6cbcbe.md Outdated

#### Inapplicable example 2

No identical link texts:
Copy link
Member

Choose a reason for hiding this comment

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

What about
Links with different accessible names

Copy link
Collaborator

@ShadowBB ShadowBB left a comment

Choose a reason for hiding this comment

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

This rule looks good apart from an unclear assumption. I am going to approve it because if the assumption means what I think it means it is technically correct but I would advise making it clearer.

_rules/6cbcbe.md Outdated

## Assumptions

This rule assumes that the purpose of the links with identical names would not be ambiguous to users in general when seen in context on the web page, as users of assistive technologies in this case is not at a disadvantage when viewing the link out of context, e.g. on a list of links in a screen reader.
Copy link
Collaborator

@ShadowBB ShadowBB Apr 29, 2019

Choose a reason for hiding this comment

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

EDIT: nvm it is all cleared up now. Approved.

@annethyme annethyme dismissed carlosapaduarte’s stale review April 29, 2019 11:46

Changes implemented. Please review again.

Copy link
Member

@carlosapaduarte carlosapaduarte left a comment

Choose a reason for hiding this comment

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

The assumption is now perfectly clear 👍

@annethyme annethyme requested a review from Brynanders April 30, 2019 11:25
@annethyme annethyme added the Review call 2 weeks Call for review for new rules and big changes label Apr 30, 2019
@annethyme
Copy link
Collaborator Author

Sent out to the ACT Rules Community through public-act-r@w3.org:

This is the FINAL CALL for the new rule "Links with identical accessible names serve equivalent purpose", #220.

The final call for this rule will end on May 14.
If you have any objections to the rule please raise them before this date.

We also encourage proceeding with implementations during the final call phase.

@@ -0,0 +1,280 @@
---
id: b20e66

This comment was marked as resolved.

_rules/6cbcbe.md Outdated
### Expectation

When followed, the links in each set of target elements resolve to the [same resource](#same-resource) or to [equivalent resources](#equivalent-purpose).
Resolving the links includes potential redirects, if the redirects happen instantly.
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it should be a note. Either add a new line between the two paragraphs, or put them on the same line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the break between the two paragraphs. Is that enough to satisfy your feedback?

If we move it into a note, it will be informative, and it shouldn't be. It's part of what makes the expectation.

Copy link
Member

Choose a reason for hiding this comment

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

In that case yeah, remove the line break. Either have something on the same line, or have an empty line between.

* contain different amounts of information and/or differently worded information
* use different layouts.

If all resources cover the user's expectations created by e.g. the link name equally well, the resources are considered to be equivalent.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you can use "e.g." in the middle of a sentence like this. I think this sentence is a little confusing. I've tried to come up with an alternative, but I'm struggling even trying to understand what you are saying here. It sounds like whether or not something is an equivalent resource depends on the link to that resource? I'm not sure that's how it works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved the "e.g. the link name" into a note instead:

Note: The user's expectations for the resource can be formed by different things, e.g. the name of the link leading to the resource, with or without the context around the link. This depends on the accessibility requirement that is tested.

Does this work for you?

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@jeeyyy jeeyyy requested a review from WilcoFiers May 15, 2019 08:17
@annethyme annethyme merged commit 277acfd into develop May 15, 2019
@annethyme annethyme deleted the SC2-4-9-links-with-identical-accessible-names-have-same-purpose branch May 15, 2019 14:45
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 Use this label for a new rule that does not exist already

Projects

None yet

Development

Successfully merging this pull request may close these issues.