w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.03k stars 229 forks source link

Clarity for the NOTE included in the "programmatically determined link context" definition #3809

Open giacomo-petri opened 1 month ago

giacomo-petri commented 1 month ago

The definition of programmatically determined link context includes a note stating:

Since screen readers interpret punctuation, they can also provide the context from the current sentence, when the focus is on a link in that sentence.

During discussions within the ACT community group about related "Programmatically Determined Link Context" rules (https://github.com/act-rules/act-rules.github.io/issues/2176#issuecomment-2089981563), we've identified inconsistencies in AT/UA support regarding the context provided by sentences.

As evidenced by examples outlined in https://github.com/act-rules/act-rules.github.io/issues/2176#issuecomment-2089981563, support for sentence context, which seems to be lacking in NVDA, appears deficient and even when present, it's not consistently reliable.

Should we consider addressing this aspect by modifying the NOTE?

mraccess77 commented 1 month ago

If the screen reader can read back the paragraph - and a paragraph includes the current sentence I wonder if this is already included by meeting that. Is there a situation where a sentence would be outside of a paragraph?

giacomo-petri commented 1 month ago

Hi @mraccess77,

If the screen reader can read back the paragraph - and a paragraph includes the current sentence I wonder if this is already included by meeting that. Is there a situation where a sentence would be outside of a paragraph?

In the linked examples you can gain further insight into the issue at hand. Consider this scenario:

<p>
    <span><a href="link1">Read more</a> about this.</span>
    <span>"Other content here".</span>
    <span><a href="link2">Read more</a> about that.</span>
    <span>"Other content here".</span>
    <span><a href="link3">Read more</a> about this and that.</span>
</p>

or simply

<p><a href="link1">Read more</a> about this.</span><a href="link2">Read more</a> about that.</p>

The problem is that by simply reading the paragraph might not enable you to differentiate between the links. However, the ability of UA/AT to recognize punctuation to read sentences - as emphasized in the note within the definition - can make a significant difference in discerning between the links, but it seems not true at the moment.

mraccess77 commented 1 month ago

It seems like that multiple link issue is a challenge for all users and not just screen reader users. So I think this goes back to the intent of the SC 2.4.4. Today it's interpretation is really aimed at screen reader users and not users with cognitive disabilities and it allows for ambiguous link text if it's ambiguous to all.