cypress-axe icon indicating copy to clipboard operation
cypress-axe copied to clipboard

Question: How to skip failures for some specific tags and throw errors for other tags?

Open bledbytyci opened this issue 2 years ago • 1 comments

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!!

bledbytyci avatar Mar 02 '23 20:03 bledbytyci

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.

durasj avatar Aug 27 '23 18:08 durasj