cypress-axe
cypress-axe copied to clipboard
Question: How to skip failures for some specific tags and throw errors for other tags?
Hi everyone, I'm new to cypress-axe. :)
I'm currently setting up cypress-axe for component testing and wanted to ask a question related to tags and assertions.
I want to throw an error if an element fails the 'wcag21a' criteria, but at the same time log errors from other tags such as 'cat.*' or 'best-practice'. Is there any preferred way we can change how the assertion works from the usage side?
Thanks in advance!!
Hi @bledbytyci,
Check out https://www.deque.com/axe/core-documentation/api-documentation/#api-name-axeconfigure where you will see you can override rules and set their matches function.