component-driven / cypress-axe

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

False Positives Occurring #81

Open rowindatas25 opened 3 years ago

rowindatas25 commented 3 years ago

Hi, I am currently using cypress-axe and I'm experiencing the same issues that were identified in this issue that's been closed: https://github.com/component-driven/cypress-axe/issues/22

I left a comment there but didn't get a response and I tried implementing the other attempts on that issue board. I was just hoping to get a clear understanding of what the fix was or if there was a fix/workaround at all. Below are the versions I'm using for Cypress:

Cypress version: 6.1 cypress-axe version: 0.12.0

I am also using cypress-axe in conjunction with Storybook: 5.3.21.

arielperez82 commented 3 years ago

I get the same issue with cypress@6.1, cypress-axe: 0.12.0.

Mine is on a Gatsby project.

tfrijsewijk commented 3 years ago

Same here, and also using Storybook. @rowindatas25 are you also using the iframe.html url?

I also installed axe as a Storybook Addon, which doesn't complain - maybe because it's not testing for these..

jb0071913 commented 3 years ago

I have a page with no headers in it and running cy.checkA11y() (using cypress-axe 0.8.1) still reports the error "page-has-heading-one on 1 Node"

ranjithamr commented 2 years ago

Has anyone found a solution to this issue? @rowindatas25 @arielperez82 @tfrijsewijk @jb0071913 @avanslaars I use Storybook and iframe.html as well.

cypress : 10.2.0 axe-core : 4.4.3 cypress-axe : 1.0.0

arielperez82 commented 2 years ago

Only way I was able to get around this was to override the implementation for injectAxe and checkAlly to assert that axe was indeed injected and initialized before the assertions ran. I think I also used the waitUntil library to help with that.

Sorry I can't provide any more detail as I no longer have access to that code.