WebAIM - Web Accessibility In Mind

E-mail List Archives

programmatically determined link context (2.4.4)

for

From: glen walker
Date: Apr 6, 2020 4:07PM


Is the definition of "programmatically determined link context" an
exhaustive list of what constitutes "context" or just an example list
(meaning other things could be considered context)?

https://www.w3.org/TR/WCAG21/#dfn-programmatically-determined-link-context

The definition says:

*"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 are only 4 conditions in that definition:

1. text in the same paragraph
2. text in the same list
3. text in the same table cell
4. text in the table header cell

Anything beyond that is not considered programmatically determined link
context?

The definition of "programmatically determined link context" is in the
glossary section and there's a note regarding the glossary as:

*"Many of these success criteria reference new terms that have also been
added to the glossary and form part of the normative requirements of the
success criteria."*

So the glossary is considered normative.

I have a situation with the following basic DOM layout:

<h3>heading</h3>
<p>stuff</p>
<a href="...">read more</a>

I've seen people argue that the heading is "context" for the link but that
doesn't fall into the glossary definition of context.

Personally, I always recommend 2.4.9 instead of 2.4.4 so that you don't
have to rely on figuring out what the context is, so in the case above, I'd
put an ID on the heading then use aria-labelledby on the link to reference
the heading.

<h3 id="id1">heading</h3>
<p>stuff</p>
<a href="..." id="id2" aria-labelledby="id2 id1">read more</a>

I wasn't sure if I was being too pedantic on the definition of context or
if the glossary definition was just a few examples and not an exhaustive
list. I don't like the slippery slope or nebulousness of who defines what
"context" is. I like using what's in the glossary and if none of those 4
contexts apply, then it fails 2.4.4.