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

False negative: Link must have discernible text #4709

Closed
1 task done
Brynman opened this issue Feb 11, 2025 · 2 comments
Closed
1 task done

False negative: Link must have discernible text #4709

Brynman opened this issue Feb 11, 2025 · 2 comments
Labels
extension Axe Firefox or Chrome extension issues ungroomed Ticket needs a maintainer to prioritize and label

Comments

@Brynman
Copy link

Brynman commented Feb 11, 2025

Product

axe Extension

Product Version

4.10.2

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

I expect a link with its name coming from an alt within a nested <picture> element to pass Ensure links have discernible text

Actual

The a is flagged as having no link text.

How to Reproduce

Open Chrome extension and run on this page https://www.argos.co.uk/product/2079998?clickCSR=slp:cannedSearch

Additional context

Image Image
@Brynman Brynman added the ungroomed Ticket needs a maintainer to prioritize and label label Feb 11, 2025
@github-actions github-actions bot added the extension Axe Firefox or Chrome extension issues label Feb 11, 2025
@straker
Copy link
Contributor

straker commented Feb 11, 2025

Thanks for the issue. I took a look at this and what I believe is happening is that the anchor in question is not fully loaded when the test is being run. When the page is first loaded the anchor is offscreen and appears to be empty, causing the anchor to be flagged as a violation.

<a href="https://apps.apple.com/gb/app/argos/id370371087" target="_blank" rel="noreferrer" data-test="footer-app-apple" style="margin-right: 16px;">
  <span></span>
</a>

However when the page is scrolled to the bottom the anchor is then populated with the App Store image. At that point the anchor gets an accessible name from the picture element and does not trigger a violation.

Since the anchor is present on the page before it is populated with an accessible name, axe is correctly flagging this as an issue (since screen readers can access the anchor before it becomes populated).

@straker straker closed this as completed Feb 11, 2025
@Brynman
Copy link
Author

Brynman commented Feb 12, 2025

Ahh yes, well spotted. I should have tried that. Thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension Axe Firefox or Chrome extension issues ungroomed Ticket needs a maintainer to prioritize and label
Projects
None yet
Development

No branches or pull requests

2 participants