Skip to content
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

Using runOnly with tags for wcag21 results in passing tests with 0 violations #123

Open
tzbarkan opened this issue Apr 2, 2022 · 5 comments

Comments

@tzbarkan
Copy link

tzbarkan commented Apr 2, 2022

If I use runOnly with tags for wcag2a and wcag2aa, I find violations as expected:
cy.checkA11y(subject, { runOnly: { type: "tag", values: ["wcag2a", "wcag2aa"] } })

But if I use the tags wcag21a and wcag21aa as documented in axe-core 4.4.1, no violations are found:
cy.checkA11y(subject, { runOnly: { type: "tag", values: ["wcag21a", "wcag21aa"] } })

Expectation: using wcag21a and wcag21aa should return a comparable number of violations. Most likely more.

Cypress 9.5.3
Cypress Axe 0.14.0
axe-core 4.4.1
with cypress-watch-and-reload 1.7.4

on Windows 10

@AndreaPontrandolfo
Copy link

AndreaPontrandolfo commented Jun 24, 2022

If I use runOnly with tags for wcag2a and wcag2aa, I find violations as expected: cy.checkA11y(subject, { runOnly: { type: "tag", values: ["wcag2a", "wcag2aa"] } })

But if I use the tags wcag21a and wcag21aa as documented in axe-core 4.4.1, no violations are found: cy.checkA11y(subject, { runOnly: { type: "tag", values: ["wcag21a", "wcag21aa"] } })

Expectation: using wcag21a and wcag21aa should return a comparable number of violations. Most likely more.

Cypress 9.5.3 Cypress Axe 0.14.0 axe-core 4.4.1 with cypress-watch-and-reload 1.7.4

on Windows 10

I'm having a very similar issue. wcag2a level is the only one that works (it gives me a bunch of severity warnings). All the other levels that i tested, just passed without raising warnings.

Cypress 9.7.0
Cypress Axe 0.14.0
axe-core ^4.4.2
Windows 10

@bjornlauwerijs
Copy link

I am having the same issue. I expect a higher level to have more issues, but I get none on all tags with wcag21a, wcag21aa, wcag21aaa. I also got some strange results with running wcag2a compared to wcag2aa and wcag2aaa.

Screenshot below explains it better (test is always running on the same page but with different tags).

2022-07-13 10_02_53-IBSBELGIUM_REPORT-screenshot

@nurulquamar
Copy link

I am also facing the same issue. wcag21a and wcag21aa are not finding any violations. But when I use wcag2a and wcag2aa I am able to. Also, these violations clearly mention that they are part of wcag21a as well.

axe-core: 4.4.3
cypress-axe: 1.0.0
cypress": 9.5.2
Mac OS 12.6

@nurulquamar
Copy link

nurulquamar commented Nov 1, 2022

@tzbarkan I opened an issue with axe-core and it was closed with a comment. See the below link if it helps:
dequelabs/axe-core#3760

@vladttt1123
Copy link

vladttt1123 commented May 15, 2024

can someone tell me what is the benefit of using :
values: ['wcag2a', 'wcag2aa'],
If as per the documentation that I found:

The WCAG criteria are cumulative—to conform to WCAG Level AA, you must first conform to A. To conform to WCAG Level AAA accessibility criteria, you just first conform to A and AA.

So using only wcag2aa is sufficient, or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants