Added the ability to include/exclude elements when running Axe reports on a page. This is not a breaking change as the default is still running the report on the full page. To make use of this, pass in a JSON to the _elementfilter parameter in the _run_axe_accessibilityreport function.
An example of include using CSS: {"include": [["#nhsuk-cookie-banner"]]}
An example of exclude using CSS: {"exclude": [["#nhsuk-cookie-banner"], [".footer"]]}
Motivation and Context
This change allows a user to include/exclude certain elements from the Axe report such as a cookie banner, a header or a footer.
Checklist
[x] New and/or updated tests
[x] All the unit tests are passing.
This is enforced automatically as part of the pull request, but we'd appreciate you running locally first.
[x] Linting score remains above threshold.
This is enforced automatically as part of the pull request, but we'd appreciate you running locally first.
Description
Added the ability to include/exclude elements when running Axe reports on a page. This is not a breaking change as the default is still running the report on the full page. To make use of this, pass in a JSON to the _elementfilter parameter in the _run_axe_accessibilityreport function. An example of include using CSS: {"include": [["#nhsuk-cookie-banner"]]} An example of exclude using CSS: {"exclude": [["#nhsuk-cookie-banner"], [".footer"]]}
Motivation and Context
This change allows a user to include/exclude certain elements from the Axe report such as a cookie banner, a header or a footer.
Checklist
CHANGELOG