a11y - speced/respec GitHub Wiki
Default: false
Runs accessibility checks using axe-core. Reports violations as ReSpec warnings, highlighting the offending elements in the document.
var respecConfig = {
lint: {
a11y: true,
},
};var respecConfig = {
lint: {
a11y: {
runOnly: ["image-alt", "link-name"],
},
},
};var respecConfig = {
lint: {
a11y: {
rules: {
"color-contrast": { enabled: true }, // slow — disabled by default
"image-alt": { enabled: false },
},
},
},
};These axe-core rules run if you enable a11y: true, except the following, which are disabled because they are slow or produce false positives on spec documents:
| Rule | Reason disabled |
|---|---|
color-contrast |
Too slow — enable explicitly when needed |
landmark-one-main |
Spec pages often lack <main>; would mark entire page as errored |
landmark-unique |
Causes false positives in spec document structure |
region |
Similar false-positive issue with spec layout |
All other axe-core default rules run. For the full list, see axe-core rule descriptions.
Add ?a11y=true to any spec URL to enable all default rules temporarily, without changing config.
- Violations appear as yellow warnings in the ReSpec pill counter; click to see the offending elements highlighted
- Running on hosted documents (GitHub Pages, W3C servers) may slow load time — enable selectively
- See axe options documentation for the full configuration API
var respecConfig = {
lint: { a11y: false },
};