WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: programmatically determined link context (2.4.4)

for

From: Birkir R. Gunnarsson
Date: Apr 6, 2020 5:57PM


I agree on the preceiding heading. The argument was something like,
you can read the same sentence or paragraph using a screen reader
shortcut but not the preceeding heading.
This is not really true, not in all screen readers anyway, but I ain't
gonna argue the case.

Speaking of which, the two links are probably in different paragraph
tags I would imagine, and paragraph is one of the programmatically
determined passes.

I recommend visually hidden text to give the link a readable text by
adding words such as "about" in along with the heading.
The aria-labelledby approach works fine, as well as using
aria-describedby to reference the id of the heading, simpler than
aria-labelledby referring to the link itself.



On 4/6/20, Patrick H. Lauke < <EMAIL REMOVED> > wrote:
> On 06/04/2020 23:07, glen walker wrote:
> [...]
>> Anything beyond that is not considered programmatically determined link
>> context?
>
> Correct. The glossary is normative, and it has been worded as an
> exhaustive list.
>
> In the past, there had been a vague understanding/interpretation that
> preceding headings also provided context, but at some point AGWG decided
> that no, that's not the case (can't find the exact decision, which I
> seem to remember may have been on WAI mailing list, but this closed
> issue in github refers to it https://github.com/w3c/wcag/issues/819).
>
> Personally, I disagree with the decision, but...that wouldn't be the
> first time.
>
> [...]
>
>> 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.
>
> I agree both that this is pedantic, but also that it's likely the
> correct interpretation for 2.4.4 based on the restrictive normative
> definition of context. (Unless, due to styling of the actual page, you
> could make an argument that that link is "ambiguous to everybody".)
>
> P
> --
> Patrick H. Lauke
>
> https://www.splintered.co.uk/ | https://github.com/patrickhlauke
> https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
> twitter: @patrick_h_lauke | skype: patrick_h_lauke
> > > > >


--
Work hard. Have fun. Make history.