A CLI tool to test web accessibility on multiple web pages based on a list of URLs in a text file. Run on Node.js and uses axe-core and Puppeteer as its testing and browsing engines.
There are cases when you want to exclude some areas from the page to be checked. I'm running axe-scan in a testing pipeline and I'm triggering a failure when there are violations. But the pages from certain URLs might contain user content with A11Y violations and that is something we can't control/enforce, thus we want to exclude from scan
Hi @claudiu-cristea, thank you for a great suggestion!
Adding the exclude option seems relatively straightforward. I'll see if I can add them in the coming updates 👍
Problem
There are cases when you want to exclude some areas from the page to be checked. I'm running
axe-scan
in a testing pipeline and I'm triggering a failure when there are violations. But the pages from certain URLs might contain user content with A11Y violations and that is something we can't control/enforce, thus we want to exclude from scanProposal
axe-core
knows to exclude areas from a11y compliance check, see https://github.com/dequelabs/axe-core/blob/develop/doc/context.md#exclude-elements-from-testaxe-core-npm
also knows to pass such options, see https://github.com/dequelabs/axe-core-npm/tree/develop/packages/puppeteer#axepuppeteerexcludeselector-string--stringaxe-scan.config.json
, a list of CSS selectors to be excluded from check