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
excluding "valid-lang" rule from a11ycheck #219
Comments
That rule was split in two and changed names. You found something we need to fix in our documentation! Here are the correct rules to disable HTML lang:
|
html-lang-valid or html-lang-invalid? Thanks! |
Actually, I misspoke. It was broken into three separate rules. |
I am interested in running snippet #4 under https://github.com/dequelabs/axe-core/blob/master/doc/API.md#options-parameter-examples - { I haven’t been able to run the set. In addition, when I pass the selector for the entire doc and enable all rules, it only runs under IE 9. |
I ran a test against some basic HTML markup with that config and I don't see var config = {
runOnly: {
type: "tag",
values: ["wcag2a"]
},
"rules": {
"color-contrast": { enabled: true },
"valid-lang": { enabled: false }
}
}
axe.a11yCheck(document, config, function(results) {
console.dir(results.violations);
}); With this markup: <html lang="en">
<head>
<title>Page title</title>
</head>
<body>
<header role="banner">
<h1>HEY</h1>
</header>
<main role="main">
<div lang="derp">
<a href="#menu" style="color:#ccc;">
Menu
</a>
</div>
</main>
</body>
</html> That only triggers one failure:
That sounds like a separate issue, definitely requiring more details. |
Ok, the valid-lang works. I have attached the html file. I interesting to note the color contrast violation that gets flagged, which is same as given by WAT Analyzer. Also, note another rule I added “skip-link:” {enabled: true }, but did not see it flagged. Thanks! |
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. **This update includes a security fix.** - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Michael <45568605+michael-siek@users.noreply.github.com>
Hi All,
On executing the script to exclude the valid-lang check, the lang test still runs in the console despite disabling it under 'rules.'
Any advise will be appreciated.
thanks!
Here it is:
axe.a11yCheck(document, {
runOnly: {
type: "tag",
values: ["wcag2a"]
},
"rules": {
"color-contrast": { enabled: true },
"valid-lang": { enabled: false },
}
}, function(results) {
console.log(results);
});
The text was updated successfully, but these errors were encountered: