🪓axe
Accessibility (A11y) Testing with aXe
Usage
The axe
fixture is the recommended way to run A11y audits since it's so easy and straightforward.
You can generate the report as a JSON and/or use the AxeReport object directly.
Running an audit will generate a JSON report only if a name
is given.
Arguments
name: str
The file path (including name and.json
extension) of the report to save as a JSONcontext: Dict
The dictionary of page part(s), by CSS Selectors, to include or exclude in the auditoptions: Dict
The dictionary of aXe options to include in the audit
Visit the official aXe documentation for more information about the context
and options
arguments.
https://github.com/dequelabs/axe-core/blob/master/doc/API.md#parameters-axerun
Yields
AxeReport - object that represents the audit report in code
If you include the name
argument, then that report is also created at the specified file path.
If any of the directories in the path do not exist, then a FileNotFound
error is raised.
Last updated