7

I want to upgrade our GitHub workflows with accessibility linting based on WCAG 2.1. If it's possible I want to define the level too like AA.

I don't want to run a full test on a website, only make a quick linting on the pull requests. The whole site testing will be the next step, but now I want to focusing to pull requests only.

I checked pa11y and several repos based on this, but as I see this solution can test only a working website and not a pull request.

Is there any working solution for this?

netdjw
  • 5,419
  • 21
  • 88
  • 162
  • 4
    You can use pa11y and other popular open-source products from GitHub Actions without too much work: https://www.adrianbolonio.com/en/accessibility-github-actions/ – José Luis Apr 15 '21 at 14:25
  • What kind of framework / language / testing environment do you use for your code ? – Roman Mkrtchian Apr 25 '21 at 01:21
  • And also: you can setup end to end tests by running your full website, using a real headless browser directly in Github Actions, and execute it on each pull requests. Do you exclude that possibility ? – Roman Mkrtchian Apr 25 '21 at 01:30
  • @RomanMkrtchian I use Angular as frontend and Laravel as backend, but it's not relevant, because I want to lint only `.html` and `.php` files. And the other answer is: I don't want to implement end to end testing. I only want to implement code linting. – netdjw Apr 25 '21 at 16:48
  • Ok, I asked about environment because I use React, and I have `eslint-plugin-jsx-a11y` as a plugin of `eslint` to lint my JSX code. There are probably many libraries for HTML code linting. I don't use the `axe-linter` verison of `axe` (that I saw in the link given by José Luis) but I use axe in my end to end tests through a web browser and it works fine, so the linter version should probably be good for what you want to do. And it exists as a [github app](https://github.com/marketplace/axe-linter). – Roman Mkrtchian Apr 25 '21 at 20:10

0 Answers0