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

skip-link rule not able to find link when scanning a logged-in WordPress page #4605

Open
1 task done
pattonwebz opened this issue Oct 10, 2024 · 2 comments
Open
1 task done
Labels
ungroomed Ticket needs a maintainer to prioritize and label

Comments

@pattonwebz
Copy link

Product

axe-core

Product Version

4.10.0

Latest Version

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

Issue Description

Expectation

The skip-link rule should find a valid skip link on the page and check it.

Actual

The skip-link rule returns inapplicable as it is unable to determine the correct skip link on the page.

How to Reproduce

A default WordPress site scanned as a logged in user creates the scenario that causes this.

Additional context

When a user is logged in on a WordPress site generally markup for an Admin Bar is added to the page which produces links that are the first page links. I understand that this breaks expectation of where a skip link should appear in the page but I can't control the placement or markup of that admin bar.

I do have the admin bar excluded in the context however the skip link heuristics do not consider the excludes context when finding the first link on the page.

@pattonwebz pattonwebz added the ungroomed Ticket needs a maintainer to prioritize and label label Oct 10, 2024
@WilcoFiers
Copy link
Contributor

Thank you for reporting this @pattonwebz. I'm not sure there is anything we can do about this. In order to avoid failing things that aren't real issues (aka false positives), axe-core can only test things if its sure about what it's testing. An internal link that's not at the top of the page may be a skip link, or it may not be. We can't say for sure, and if we can't be sure we can't test it without false positives.

That's the tradeoff axe has to make to be as accurate as it is, it sometimes has to ignore things that could be issues, because we're not confident enough that it will be.

@pattonwebz
Copy link
Author

@WilcoFiers I understand that the default rules should be using certainty and avoiding false positives. However if the heuristics for this was updated to take into account the context.exclude[] values then for WordPress sites it could be made to be reliable by simply excluding the admin bar ID.

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

No branches or pull requests

2 participants