act-rules / act-rules.github.io

Accessibility conformance testing rules for HTML
https://act-rules.github.io/
Other
131 stars 67 forks source link

"Programmatically Determined Link Context" definition is too broad #2176

Open Jym77 opened 2 months ago

Jym77 commented 2 months ago

The definition of Programmatically Determined Link Context includes all the containing paragraph (or block ancestor). This means that links inside the same paragraph cannot be disambiguated by their sentence, which is part of the note in the WCAG definition of programmatically determined link context:

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.

So,

<p>
 <a href="foo.html">Read more</a> about foo.
 <a href="bar.html">Read more</a> about bar.
<p>

fails the rule, but arguably passes the SC (not the best practice, but still correct) because the sentence provides the context.

carlosapaduarte commented 2 months ago

@carlosapaduarte check if there is an "universal" objective of sentence

giacomo-petri commented 2 months ago

It's worth noting that AT/UA support can be rather inconsistent for the situation pointed out by @Jym77.

For instance, when using VO + Chrome, pressing VO+S to announce the sentence results in it reading "about bar" regardless of whether it's the first or second "read more."

screenshot of VO on Chrome reads about bar, even though it should say about foo screenshot of VO on Chrome reads about bar correctly

However, when using VO + Safari, pressing VO+S correctly reads the sentence and its context.

screenshot of VO on Chrome reads read more about foo correctly screenshot of VO on Chrome reads read more about bar correctly
Jym77 commented 2 months ago

CG decision (April 25th): make more test of AT/UA, then if the problem is generic, open issue with WCAG.

giacomo-petri commented 2 months ago

@Jym77,

I've created test cases and the results are provided below. Here's the rundown of the tests:

Outcome:

  Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example 7
VO + Chrome (paragraph - VO+P) “Read more” “Read more” “Read more” “Read more” “Read more” “Read more” “Read more”
VO + Chrome (sentence - VO+S) “Read more” “Read more” “Read more” “Read more” “Read more” “Read more” “Read more”
VO + Safari (paragraph - VO+P) Read more about foo. Read more about bar. Read more about foo. Read more about bar. [“Read more about foo.”, “Read more about bar.”] Read more about foo. Read more about bar. Read more about foo. Read more about bar. Read more about foo. Read more about bar. Read more about foo (read more about bar).
VO + Safari (sentence - VO+S) [“Read more about foo.”, “Read more about bar.”] [“Read more about foo. R”, “ut foo. R”] [“Read more about foo.”, “Read more about bar.”] [“Read more about foo.”, “Read more about bar.”] [“Read more about foo. R”, “foo. R”] Read more about foo. Read more about bar. Read more about foo (read more about bar).
NVDA + Firefox (Read current line) “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo. ” “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo, link read more about bar” “Link read more about foo (link read more about bar)”
NVDA + Chrome (Read current line) “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo. ” “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo, link read more about bar” “Link read more about foo (link read more about bar)”
NVDA + Edge (Read current line) “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo. ” “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo, link read more about bar” “Link read more about foo (link read more about bar)”
JAWS + Chrome (Say current line) “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more”
JAWS + Chrome (Say current sentence) “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more”
JAWS + Chrome (Say current paragraph) “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo.” “Link read more about foo. Link read more about bar” “Link read more about foo.” “Link read more about foo, link read more about bar” “Link read more about foo (link read more about bar)”
JAWS + Edge (Say current line) “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more”
JAWS + Edge (Say current sentence) “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more” “Link read more”
JAWS + Edge (Say current paragraph) “Link read more about foo. Link read more about bar” “Link read more about foo. Link read more about bar” “Link read more about foo.” “Link read more about foo. Link read more about bar” “Link read more about foo.” “Link read more about foo, link read more about bar” “Link read more about foo (link read more about bar)”

It appears that sentence support, which seems to be lacking in NVDA, isn't consistently reliable even when available.

I plan to bring up this issue on the WCAG GitHub in the next few days.