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

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

Closed
greenc05 opened this issue Jul 9, 2019 · 10 comments · Fixed by #9343
Closed

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

greenc05 opened this issue Jul 9, 2019 · 10 comments · Fixed by #9343

Comments

@greenc05
Copy link

greenc05 commented Jul 9, 2019

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: #9075

@greenc05 greenc05 changed the title Link with nested role text result in error 'Links do not have a discernible name' Link with nested role text results in error 'Links do not have a discernible name' Jul 9, 2019
@patrickhulce
Copy link
Collaborator

Is this actually different from #9075?

From my limited understanding it seems like it's the same root axe issue dequelabs/axe-core#1597

@greenc05
Copy link
Author

greenc05 commented Jul 9, 2019

It would certainly seem to be related, whether it's the same issue I guess axe can only answer that? I wasn't sure as it gives a different error. I've just asked in dequelabs/axe-core#1597

@greenc05
Copy link
Author

@patrickhulce how to I find out what version of axe Lighthouse is using? dequelabs/axe-core#1597 (comment)

@greenc05
Copy link
Author

greenc05 commented Jul 10, 2019

So interestingly I just ran a Lighthouse (Lighthouse 4.3.1) audit using the 'Audit' tab in the Chrome browser (Version 75.0.3770.100 Official Build 64-bit) and it gives the error 'Links do not have a discernible name' however when I run an 'Audit' using the Lighthouse browser extension (Lighthouse 5.1.0) I do not get that error.

I presume Lighthouse 4.3.1 is using a different version of axe to Lighthouse 5.1.0?

How do I ensure I'm using the latest version of Lighthouse in the web inspector 'Audit' tab? Which I believe is the recommended way to run this tool?

@patrickhulce
Copy link
Collaborator

The version of Lighthouse in Audits panel of stable Chrome runs a bit behind because of Chrome's release process. To use latest, you can use the CLI (npm install -g lighthouse), extension, or Chrome Canary.

Not a particularly easy way to tell what version of axe we're using outside of the source. It's on 3.2.2 currently and in 5.1.0.

"axe-core": "3.2.2",

@patrickhulce
Copy link
Collaborator

Looks like we need to update to 3.3.0 then!

@patrickhulce
Copy link
Collaborator

Do you have a repro URL for this page @greenc05?

@greenc05
Copy link
Author

greenc05 commented Jul 10, 2019

Thanks @patrickhulce Do I have a repro URL for which page?

@patrickhulce
Copy link
Collaborator

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

@greenc05
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants