axe-core
axe-core copied to clipboard
axe Linter not respecting tags
Product: axe Linter
Expectation:
when applying the following axe-linter.yml
config, I would expect that the html-has-lang has been disabled.
rules:
tags:
- wcag2a
adding all other tags (wcag2aa
, wcag21a
, wcag21aa
), doesn't change anything either.
Disabling the rule with
rules:
html-has-lang: false
tags:
works.
Actual:
When having the following axe-linter.yml
config, the html-has-lang rule should be disabled, since the rule is tagged with WCAG 2.1
. But it's not :(
rules:
tags:
- wcag2a
Motivation: I would like to understand how the tags in the config work, or if it is indeed a bug or description issue.
axe Linter version: 4.4.1
VSCode version: 1.69.2
For Tooling issues:
- Node version: 16.16.0
- Platform: Linux
Thanks for the issue. I'm not quite sure I follow. The html-has-lang
rule is tagged as a wcag2a
rule. So I would expect listing it as a tag would still run the rule.
rules:
tags:
- wcag2a
However, are you saying that listing any other tag by itself still runs the rule?
Thanks for your fast response. After your answer I have the feeling that the plugin description might be misleading. It says
You can also disable rules as a group based on WCAG standard they are associated with using the tags entry:
tags: # Disable all rules for WCAG 2.0 and 2.1, level A and level AA
- wcag2a
- wcag2aa
- wcag21a
- wcag21aa
maybe instead it should say
You can also enable only a set of rules as a group based on WCAG standard they are associated with using the tags entry and
tags: # **Enable** all rules for WCAG 2.0 and 2.1, level A and level AA **(or Disable all rules besides...)**
- wcag2a
- wcag2aa
- wcag21a
- wcag21aa
Not sure if I just got it wrong...
However, are you saying that listing any other tag by itself still runs the rule?
to answer your question: replacing the single tag with another disables the rule.
Ok. Thanks for the response. I agree that our description of the tags
property should be improved.