bevy-website icon indicating copy to clipboard operation
bevy-website copied to clipboard

Add accessibility lints to CI

Open TimJentzsch opened this issue 3 years ago • 1 comments

I'm not sure if there is an easy way to add this to Zola projects, but it would be nice to have basic accessibility checks in CI. Stuff like "every img element has an alt attribute" should be enough for the start.

If Zola has anything built-in we could use that, otherwise maybe it's possible to do the linting on the generated HTML?

TimJentzsch avatar Jul 18 '22 20:07 TimJentzsch

Did a little bit of research on this. pa11y seems to be a good candidate and has a version explicitly for CI: pa11y-ci.

I've done a local test with the tool and once installed it does work to catch accessibility issues on the site; technically more than even the Firefox accessibility tools showed me. Showed missing image alt text and told me the recommended color to use for each contrast issue.

One issue is that pa11y-ci had little bit of issues when I tested it compared to regular pa11y

This link has other recommendations for accessibility linters and useful things that should be considered https://www.digitala11y.com/free-accessibility-linters-to-automate-accessibility-workflow/

TrialDragon avatar Feb 20 '24 07:02 TrialDragon