Open shanear opened 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?
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 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?
@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
It's better maintained and built in a much more modern way
https://github.com/dequelabs/axe-core