Skip to content

Incomplete ruleset when running axe-core to check WCAG 2.1 withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21a']). #4753

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

Open
1 task done
Bucci-83 opened this issue Apr 17, 2025 · 1 comment
Labels
ungroomed Ticket needs a maintainer to prioritize and label

Comments

@Bucci-83
Copy link

Product

axe-core

Product Version

4.10.1

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Hi

I just noticed that when I run axe-core withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21a']) to check all rules applied to WCAG 2.1, some rules are missing in this check (i.e duplicate-id rule, which is important rule in 4.1.1 Parsing (Level A)).
Missing rules are those listed at "Deprecated Rules" section in https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md
Those rules will be deprecated in WCAG 2.2, but are still legit in WCAG 2.1, so they should be included in WCAG 2.1 check.

I tried to get around it any other way, but I cannot run axe-core withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21a']) and .withRules(['duplicate-id']) in the same iteration, so I need to run it twice to include those missing rules i.e.:

  1. First run with withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21a'])
  2. Second run .withRules(['duplicate-id'], ... [other missing rules])

Expectation

When runnig axe-core with withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21a']) to check all rules applied to WCAG 2.1, axe-core should also check rules i.e. duplicate-id and other listed as
"Deprecated Rules" in https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md

Actual

When runnig axe-core with withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21a']) to check all rules applied to WCAG 2.1, axe-core ommits rules like duplicate-id and other listed as
"Deprecated Rules" in https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md

@Bucci-83 Bucci-83 added the ungroomed Ticket needs a maintainer to prioritize and label label Apr 17, 2025
@WilcoFiers
Copy link
Contributor

Success criterion 4.1.1 got removed from WCAG 2.2 but not from WCAG 2.1. But the W3C did instead add a note to WCAG 2.1 suggesting that in HTML this 4.1.1 should not be failed:

This success criterion should be considered as always satisfied for any content using HTML or XML.

This is the reason we deprecated the the duplicate-id rules. If you want to run them anyway what you can do is use the wcag2a-obsolete tag. We recommend not to do this. SC 4.1.1 may not have been removed, from WCAG 2.0 and 2.1, but the reason for removing it from WCAG 2.2 is because it should not be failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ungroomed Ticket needs a maintainer to prioritize and label
Projects
None yet
Development

No branches or pull requests

2 participants