department-of-veterans-affairs/sniffybara

Investigate axe as an accessibility scanner alternative

Opened this issue · 6 comments

It's better maintained and built in a much more modern way

https://github.com/dequelabs/axe-core

Hi @shanear! I did some investigation into integrating Axe into an RSpec/Capybara suite, and there's actually a repo full of axe RSpec goodness (https://github.com/dequelabs/axe-matchers). I made a little RSpec addon for my own purposes. Have a look at this commit: conference-opportunities/conference-opportunities@058a9c0

I am able to switch out drivers (phantom/firefox/potentially others) and still have it work. Should this be the direction for Sniffybara, plus some configuration?

This looks great!

Using these matchers seems like a much better solution than injecting and running code sniffer after every step.

Your RSpec addon is basically what we want to do with sniffybara, except have it "on" by default (don't require the :accessible flag). Also like you said, add configuration options to omit rules/urls when absolutely necessary.

Glad to hear, @shanear!

Check out spec/support/axe.rb in conference-opportunities/conference-opportunities@263ee72. There's a configuration block and the accessibility matchers run against all feature specs. Look about right?

@ohrite Alrighty, finally got around to getting this done!

Adds accessibility checks without any need to add anything to all of your spec files. Let me know what you think.

Hi! I found this while looking at accessibility tooling... have you considered using Google's Accessibility Developer Tools under the hood? It's already been developed with capybara-accessible, which I've used to good effect.

@thecristen we have, however AxE has better support for a wider variety of accessibility rule sets which is why we went with it.

For instance, we are able to plug our organization specific ruleset into AxE:
https://github.com/department-of-veterans-affairs/caseflow/blob/master/spec/support/VA-axe-configuration.json