nolanlawson / pinafore

Alternative web client for Mastodon (UNMAINTAINED)
https://pinafore.social
GNU Affero General Public License v3.0
1.02k stars 173 forks source link

Add aXe testing to automated CI tests #513

Open nolanlawson opened 6 years ago

nolanlawson commented 6 years ago

We can use this testcafe plugin: https://github.com/helen-dikareva/axe-testcafe

sorin-davidoi commented 6 years ago

The plugin uses an older version of aXe, but there are two pull requests opened if the latest version is needed.

nolanlawson commented 5 years ago

Interestingly it seems aXe cannot test Pinafore. I've tried axe-cli as well, and it just hangs. screenshot from 2018-12-05 22-53-07

I thought maybe it was due to CSP, but I disabled it and it still fails.

On the bright side, Lighthouse does seem to be working so perhaps this should be closed in favor of https://github.com/nolanlawson/pinafore/issues/746

sorin-davidoi commented 5 years ago

aXe runs for me in both Firefox Nightly and Chromium.

image

nolanlawson commented 5 years ago

axe works for me now, although it's finding some false positives: https://github.com/dequelabs/axe-core/issues/1176#issuecomment-473704254

NickColley commented 1 year ago

Want to get this going to ensure when we resolve contrast issues we dont accidentally regress so adding to milestone for WCAG compliance.

nolanlawson commented 1 year ago

@NickColley Thanks a lot. AA sounds totally achievable for us. (My understanding is that AAA is more like a "stretch goal" so not necessarily something we need to target?)

NickColley commented 1 year ago

Yeah some things you want to try and aim for AAA but sometimes it's actually impossible to meet all to AAA.

AA is what the main legislation for the EU and UK Public Sector Accessibility Regulations align with, and is becoming a sort of defacto baseline, and definitely achievable for us.

NickColley commented 1 year ago

Just a note on false positives, it's pretty common for axe to throw up issues that are false positives so what we'd do in this case is disable the rule that is being thrown and document why. This may also be a good way to introduce the tests as well, in a sort of 'failing test' situation where we add axe and raise github issues for each disabled rule.