Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accessibility lints to CI #396

Open
TimJentzsch opened this issue Jul 18, 2022 · 1 comment · May be fixed by #1046
Open

Add accessibility lints to CI #396

TimJentzsch opened this issue Jul 18, 2022 · 1 comment · May be fixed by #1046

Comments

@TimJentzsch
Copy link
Contributor

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?

@TrialDragon
Copy link
Member

TrialDragon commented Feb 20, 2024

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 TrialDragon linked a pull request Feb 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants