department-of-veterans-affairs / sniffybara

Gem that adds automatic 508 accessibility compliance checks into your Capybara specs
Other
19 stars 3 forks source link

Investigate axe as an accessibility scanner alternative #11

Open shanear opened 8 years ago

shanear commented 8 years ago

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

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

ohrite commented 8 years ago

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: https://github.com/conference-opportunities/conference-opportunities/pull/15/commits/058a9c0a1de17b9857d8dd5a7e745a5b87d7fbbe

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?

shanear commented 8 years ago

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.

ohrite commented 8 years ago

Glad to hear, @shanear!

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

shanear commented 8 years ago

@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.

thecristen commented 7 years ago

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.

shanear commented 7 years ago

@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