Skip to content

Commit

Permalink
feat: check for fragment links
Browse files Browse the repository at this point in the history
  • Loading branch information
dbajpeyi committed Jan 16, 2025
1 parent a42b5c7 commit 8ff3e82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/FormAnalyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class FormAnalyzer {
const isElementLikelyALink = (el) => {
if (el == null) return false;
return (
(el instanceof HTMLAnchorElement && el.href && el.getAttribute('href') !== '#') ||
(el instanceof HTMLAnchorElement && el.href && !el.getAttribute('href')?.startsWith('#')) ||
(el.getAttribute('role') || '').toUpperCase() === 'LINK' ||
el.matches('button[class*=secondary]')
);
Expand Down

0 comments on commit 8ff3e82

Please sign in to comment.