component-driven / cypress-axe

Test accessibility with axe-core in Cypress
MIT License
622 stars 86 forks source link

Using custom matches for axe ruls #44

Closed nickyblissAviva closed 4 years ago

nickyblissAviva commented 4 years ago

We are trying to use a custom matches for some of the axe rules to remove a few false positives that are currently being thrown. The documentation for axe-core states that a string with the relative path to the JS file containing the custom matches function must be used (https://github.com/dequelabs/axe-core/blob/develop/doc/developer-guide.md#matches-function). The problem we are having is what is the path relative too as nothing we have tried has worked.

Also is there any way of importing the original matches function used by axe core ie (https://github.com/dequelabs/axe-core/blob/develop/lib/rules/color-contrast-matches.js)

nickyblissAviva commented 4 years ago

Turns out there is an issue with the axe-core documentation which they will be fixing