Skip to content

Accessibility testing with aXe#219

Open
ozcoder wants to merge 7 commits intocloudflare:mainfrom
ozcoder:a11y_axe
Open

Accessibility testing with aXe#219
ozcoder wants to merge 7 commits intocloudflare:mainfrom
ozcoder:a11y_axe

Conversation

@ozcoder
Copy link
Copy Markdown
Contributor

@ozcoder ozcoder commented Mar 23, 2026

Added the --a11y command line option to run an accessibility test on the webpage. It produces a JSON report file called a11y.json.

The options for the command line are in JSON format. Example :-

--a11y '{"tags": ["wcag2aa"], "disable": ["color-contrast"]}'

  • tags is the name of a group of rules, usually a Standard name. Given as an array of strings.
  • disable is to disable a particular rule that you do not want in the report. Given as an array of strings.
  • exclude is to exclude a particular HTML tag element from being checked. Given as an array of CSS Selector strings.

See https://github.com/dequelabs/axe-core/blob/HEAD/doc/rule-descriptions.md for more information.

Closes #60

Added command line option --a11y which takes a JSON object as a parameter.
Collect the accessibility metrics if the A11Y tag (rules level) has been asked for.
Handle test exclusion of a HTML tag by its class or ID as a CSS selector.
Allow disabling of individual rules.
Write out the accessibility results as a11y.json file.
Added types to support the --a11y option.
Added ZOD config for --a11y command line option.
@ozcoder ozcoder requested a review from a team March 23, 2026 00:27
@ozcoder
Copy link
Copy Markdown
Contributor Author

ozcoder commented Mar 23, 2026

I may need some help with the zod configuration. It works, but doesn't feel correct.

Note: This PR does not include any changes to the telescopetest website. I'm not sure if that should be a separate ticket or not.

@mjkozicki
Copy link
Copy Markdown
Contributor

mjkozicki commented Mar 23, 2026

We are looking into the license and allowability for https://github.com/dequelabs/axe-core/.

@ozcoder

@mjkozicki
Copy link
Copy Markdown
Contributor

We are good to go with this. @sergeychernyshev will need to review.

@ozcoder

@sergeychernyshev sergeychernyshev added the ticket This label indicates that internal ticket was created to track it. label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ticket This label indicates that internal ticket was created to track it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility tests with Axe runner for Playwright

3 participants