Skip to content
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

[a11y][AAA] Link Purpose (Link Only) #147

Closed
DuaelFr opened this issue Jan 8, 2018 · 7 comments
Closed

[a11y][AAA] Link Purpose (Link Only) #147

DuaelFr opened this issue Jan 8, 2018 · 7 comments

Comments

@DuaelFr
Copy link

DuaelFr commented Jan 8, 2018

[Summary rewritten according to @fuzzbomb first comment]

https://www.w3.org/TR/WCAG21/#link-purpose-link-only

Success Criterion 2.4.9 Link Purpose (Link Only)
(Level AAA)
A mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general.


The "view recipe" links fall into this criterion.
Take a look at the node's "read more" links provided by core to see how you can make better (\Drupal\node\NodeViewBuilder::buildLinks).

@DuaelFr DuaelFr changed the title [a11y][ [a11y][A] Link Purpose (In Context) Jan 8, 2018
@fuzzbomb
Copy link

fuzzbomb commented Jan 8, 2018

Can you elaborate on the problem, for level-A link purpose?

I don't think it's an instance of F63: Failure of Success Criterion 2.4.4 due to providing link context only in content that is not related to the link because we have context from the preceding heading, which is the recipe name...

Procedure

Locate links where some additional link context is needed to understand the purpose of the link. For each link:

  1. Check whether the context is contained in the same sentence, paragraph, list item, table cell, associated table headers, or preceding heading.

@DuaelFr
Copy link
Author

DuaelFr commented Jan 8, 2018

You are right, thanks. I didn't see the part related to preceding headings (which should be in the programatically determined context list, I suppose). I'll retitle this issue to mark it AAA instead and we'll see if we want to invest some time fixing it or not.

@DuaelFr DuaelFr changed the title [a11y][A] Link Purpose (In Context) [a11y][AAA] Link Purpose (Link Only) Jan 8, 2018
@fuzzbomb
Copy link

Oh, I just noticed an inconsistency in WCAG 2.0!

The WCAG 2.0 Recommendation and Understanding SC 2.4.4 documents describe "programatically determined link context" in HTML like so:

In HTML, information that is programmatically determinable from a link in English includes text that is in the same paragraph, list, or table cell as the link or in a table header cell that is associated with the table cell that contains the link.

There's no mention of preceding headings providing context here.

However the testing procedure in F63: Failure of Success Criterion 2.4.4 due to providing link context only in content that is not related to the link describes it a bit differently. It DOES mention preceding headings as providing link context (emphasis mine):

Locate links where some additional link context is needed to understand the purpose of the link. For each link:

  1. Check whether the context is contained in the same sentence, paragraph, list item, table cell, associated table headers, or preceding heading.

  2. Check whether the link context can be programmatically determined in some other way, for example, by using a WAI-ARIA property such as aria-label, aria-labelledby or aria-describedby on the link to provide sufficient context

WCAG 2.0 is 10 years old now, and predates the HTML5 elements like article and section, so maybe these WCAG definitions need an update.

I think this discrepancy is worth filing an issue against WCAG in the W3C repo.

@markconroy
Copy link
Collaborator

Hi Folks,

I'm a little muddled here. Do I need to do anything on this issue?

@fuzzbomb
Copy link

@markconroy Not for now. We're in some doubt as to whether WCAG2 actually requires this at level A. The question is whether the preceding headings provide the context needed for level A. I think we need to research this, and ask the wider a11y community.

@fuzzbomb
Copy link

I see we have a Drupal.org issue about this too - Umami Theme - follow-up - is a11y context needed for read more links?

Be careful about filing follow-ups on D.o without referencing existing issues here. We're in danger of having parts of the discussion lost by taking in two places at once. It could make things harder to keep track of, and confusing for new contributors.

@fuzzbomb
Copy link

Let's close this one here, not needed for MVP. I've marked the D.O issue as postponed maintainer needs more info

https://www.drupal.org/project/drupal/issues/2937639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants