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

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

Open
Jym77 opened this issue Apr 10, 2024 · 4 comments
Open

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

Jym77 opened this issue Apr 10, 2024 · 4 comments
Assignees

Comments

@Jym77
Copy link
Collaborator

Jym77 commented Apr 10, 2024

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
Copy link
Member

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

@giacomo-petri
Copy link
Collaborator

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
Copy link
Collaborator Author

Jym77 commented Apr 25, 2024

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

@giacomo-petri giacomo-petri self-assigned this Apr 25, 2024
@giacomo-petri
Copy link
Collaborator

@Jym77,

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

  • Example 1
    <h2>Example 1</h2>
    <div>
        <p>
            <a href="foo.html">Read more</a> about foo.
            <a href="bar.html">Read more</a> about bar.
        </p>
    </div>
    

    Read more about foo. Read more about bar.

  • Example 2
    <h2>Example 2</h2>
    <div>
        <p>
            <span><a href="foo.html">Read more</a> about foo.</span>
            <span><a href="bar.html">Read more</a> about bar.</span>
        </p>
    </div>
    

    Read more about foo. Read more about bar.

  • Example 3
    <h2>Example 3</h2>
    <div>
        <div><a href="foo.html">Read more</a> about foo.</div>
        <div><a href="bar.html">Read more</a> about bar.</div>
    </div>
    
    Read more about foo.
    Read more about bar.
  • Example 4
    <h2>Example 4</h2>
    <div>
        <a href="foo.html">Read more</a> about foo.
        <a href="bar.html">Read more</a> about bar.
    </div>
    
    Read more about foo. Read more about bar.
  • Example 5
    <h2>Example 5</h2>
    <div>
        <span role="paragraph"><a href="foo.html">Read more</a> about foo.</span>
        <span role="paragraph"><a href="bar.html">Read more</a> about bar.</span>
    </div>
    
    Read more about foo. Read more about bar.
  • Example 6
    <h2>Example 6</h2>
    <div>
        <p>
            <a href="foo.html">Read more</a> about foo, <a href="bar.html">read more</a> about bar.
        </p>
    </div>
    

    Read more about foo, read more about bar.

  • Example 7
    <h2>Example 7</h2>
    <div>
        <p>
            <a href="foo.html">Read more</a> about foo (<a href="bar.html">read more</a> about bar).
        </p>
    </div>
    

    Read more about foo (read more about bar).

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.

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