-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support selectors for disabledRule #53
Comments
Good idea, and I agree it would be safer. Thanks for suggesting! Not sure how to implement this, though. axe-core's API lets us target specific selectors to check, but I'm not aware of any way to exclude selectors from rules. |
I did some digging and may have found an API that would support this functionality using an include-exclude object in axe-core's run method I'm not sure what the integration would look like, but we may be able to update the code to accept this object and pass it along to where we call |
If I'm reading it right, that would let us exclude elements from being checked at all, but wouldn't let us exclude elements per rule. Although maybe excluding elements from being checked at all is the best option we have. |
🤦 Oh right, yeah I think you're right and this wouldn't allow that |
Could still be useful, though! |
If there's a need for it, then definitely, @leandroferreira. The only complication: I think the context will have to be json serializable, since it would have to be passed from Node to Playwright to the browser. So I can imagine something like this totally working:
but you wouldn't be able to use something like |
Oh wow that was unbelievably quick, thank you so much! This will work perfectly for my use case 🥇 |
Currently, when disabling a rule, it can only be disabled for the specific story or globally. Supporting selectors would be a safer way of ignoring a violation across stories as Axe will then only ignore very specific elements and keep reporting violations on other elements of this rule.
The text was updated successfully, but these errors were encountered: