-
Notifications
You must be signed in to change notification settings - Fork 795
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 Positive: Angular skiplink using routerLink & fragment #1204
Comments
@MrGrigri the example won't load for me, can you check to make sure your demo works without authenticating on stackblitz? |
Yeah, I opened it in an 'incognito' window in chrome and it works fine. |
My guess is your local network is blocking it. |
It was something weird with Chrome–I can get it to load in Firefox. The link does render an href, but I think it's being thrown off by the clientside routing. If you remove the |
Yeah, Angular adds the |
It wouldn't be a focusable skip link without the href, so that part seems necessary. |
Any update on this? Can you maybe provide a codepen that we could use instead @MrGrigri? |
I was able to get the example running. Based on inspecting the DOM, it is clear that the skip link perhaps needs a landmark region (just as axe reports). @MrGrigri |
That div is only there to push the rest of the content down - ONLY FOR THE DEMO. That Here is the link to the code. It's all in angular. |
After some research, I think I've figured it out. What's happening is that the skip to content link is has a This is a false positive, clearly this is a skiplink and axe is misidentifying it. We'll have to fix it. Thank you for reporting! |
Thanks for y'all's help. |
When utilizing the Angular router module as a skip-link, the Axe browser extension for Chrome creates a false positive claiming: "All page content must be contained by landmarks". I believe this might be an issue due to the fact that there is no
href
attribute on the link itself. There are a couple of Angular directives (routerLink and fragment) as well as a click event binding that controls what happens when the user clicks or interacts with the link.The text was updated successfully, but these errors were encountered: