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

Is there a way to detect non-accessible interactive elements on a webpage? #4487

Closed
kozack-webspark opened this issue Jun 4, 2024 · 1 comment
Labels
question ungroomed Ticket needs a maintainer to prioritize and label

Comments

@kozack-webspark
Copy link

Product

axe-core

Question

Let's say I have a webpage with <div> on it. This element doesn't have any role or tabindex. But JavaScript on this page create a click event listener on this element. Obviously this is a critical issue but seems, axe doesn't detect it. I just try to run analyze (i use play write integration) with non-accessible div and axe ignore this issue.

Is there a way to detect such cases?

@kozack-webspark kozack-webspark added question ungroomed Ticket needs a maintainer to prioritize and label labels Jun 4, 2024
@straker
Copy link
Contributor

straker commented Jun 4, 2024

Thanks for the question. Unfortunately JavaScript has no way to detect event listeners on elements so it's not possible to detect interactive elements that only use event listeners. Chrome supports getEventListeners, but it's only available in the DevTools console.

@straker straker closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ungroomed Ticket needs a maintainer to prioritize and label
Projects
None yet
Development

No branches or pull requests

2 participants