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

fix(skip-link): work with absolute and relative paths #2875

Merged
merged 15 commits into from
Jan 20, 2022
Prev Previous commit
Next Next commit
Update lib/commons/dom/is-skip-link.js
Co-authored-by: Wilco Fiers <[email protected]>
  • Loading branch information
straker and WilcoFiers committed Apr 19, 2021
commit 44adf1e26af22854301f8fb8a648c6e32f8cddc2
2 changes: 1 addition & 1 deletion lib/commons/dom/is-skip-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function isSkipLink(element) {
const currentPage = window.location.origin + window.location.pathname;
straker marked this conversation as resolved.
Show resolved Hide resolved
firstPageLink = querySelectorAll(
axe._tree,
'a[href]:not([href^="javascript"])'
'a[href]:not([href^="javascript:"])'
).find(({ actualNode }) => {
const href = actualNode.getAttribute('href');
if (angularSkipLinkRegex.test(href)) {
Expand Down