Accessibility testing: WCAG checks with axe-core
Checks the page's accessibility (WCAG) with axe-core and logs the problems found, with how to fix them.
Nothing to set up: it's on by default, so a plain elsetest --url staging.example.com already uses it. The options below are for fine-tuning.
This is Elsetest's Accessibility plugin. It runs as the instance CheckAccessibility.
Like every plugin, it gets its turn at random: in each step of a test, one plugin instance is picked, weighted by its frequency. Raise it to check more often.
Options
Set them for one instance with --plugin alias=<alias> key=value, or for every instance of the plugin with --plugin name=Accessibility key=value. In a config file, each --plugin is an object in "plugins", e.g.:
{
"plugins": [
{
"alias": "CheckAccessibility",
"standard": "wcag22aa",
"frequency": "normal"
}
]
}
A selector says which elements of the page an option is about, e.g. #chat-widget or .cookie-banner button: see Selectors.
frequency
--plugin alias=CheckAccessibility frequency=<level>
How often the plugin runs compared to the others.
standard
--plugin alias=CheckAccessibility standard=<standard>
The WCAG version and level to check, with the levels below it. wcag21aa is what EN 301 549 and the EU's Web Accessibility Directive require.
bestPractice
--plugin alias=CheckAccessibility bestPractice=true|false
Also check axe-core's best practices, which aren't WCAG requirements.
impact
--plugin alias=CheckAccessibility impact=<impact>
Only log problems with at least this impact on users.
ignoreSelector
--plugin alias=CheckAccessibility ignoreSelector=<selector>
Don't check elements matching this CSS selector, or inside them, e.g. a third-party widget the site can't fix (a chat, an embedded map). Rules on the whole page, such as its language, still apply. The site can also mark the elements in its HTML with the attribute data-elsetest-accessibility-ignore.
Default instances
| Alias | The options it sets |
|---|---|
CheckAccessibility | frequency=low |
Other plugins
Ai · BrokenText · Click · Cluster · History · Login · MutationCluster · Overlap · Scroll · SelectOption · Spelling · Type · Validate
This page is generated from the help texts of Elsetest 0.9.8. The same help is in the program: elsetest --help.