question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Link with nested role text results in error 'Links do not have a discernible name'

See original GitHub issue

When a link has a nested element with role="text" (added to stop ‘text splitting’ in VoiceOver iOS https://axesslab.com/text-splitting/) such as:

<a href="myurl.com">
    <span role="text">
        <span class="VisuallyHiddenText">Audio, </span>
        <span>Today's headlines</span>
        <span class="VisuallyHiddenText">, 1 minute 3 seconds</span>
    </span>
</a>

This causes the following error when running an audit in Lighthouse Accessibility ‘Links do not have a discernible name’.

This error should not occur as the link does have a discernible name with the presence of role="text". See related issue: https://github.com/GoogleChrome/lighthouse/issues/9075

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Jul 10, 2019

Nevermind I created one with the repro, just curious if the page with the example code you provided was in the wild somewhere 😃

0reactions
greenc05commented, Jul 10, 2019

It will be live on Monday! Can send it then if useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A11y error: Links do not have a discernible name
Links do not have a discernible name Link text (and alternate text for images, when used as links) that is discernible, unique, and...
Read more >
Links must have discernible text | Axe Rules - Deque University
Ensure that all link names are accessible. It may be possible that the inner link text is not visible to a screen reader,...
Read more >
Accessibility rule: Links must have discernible text
When used as links, link text and alternative text for images must be recognizable by screen readers, have no duplicate labels, and be...
Read more >
Accessibility issue: Links do not have a discernible name - SEO
For accessibility reasons (required for screen readers) links must contain a text or have description in aria-label attribute. In many use cases ...
Read more >
Link has non-empty accessible name | ACT Rule | WAI - W3C
When the link role is used on elements that do not behave as links, ... For area elements that have an href attribute,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found