Migrating to axe DevTools HTML v4.x for Ruby
Steps for migrating to version 4.x of axe DevTools HTML for Ruby
axe DevTools HTML Gems v4.x is a major rewrite of the entire project. The most notable changes are summarized below, followed by more specific changes to relevant packages.
axe-devtools-* suite of gems were re-architected to slim down the provided integration tools and offer a better developer experience.
Compared to previous versions where only a single gem was provided, this version provides a collection of gems allowing end users to choose what is essential and fits best with their current workflow.
Given the split from a monolithic gem structure to individual gems, some migration steps are required. You can use the following migration guide.
There are no changes from the previous developer setup. The necessary requirements are as follows:
- Ruby (the latest version)
- Bundler for gem dependencies
- Rake as a task runner
- RSpec or Cucumber for testing
- Node and Npm for installing the axe-core package
After you have access to Deque's registry, you may install any of the following gems by including them in either the Gemfile or gemspec files.
Alternatively, you can specify a source to the gem:
gem "attest-devtools-cucumber", :source => 'https://agora.dequecloud.com/artifactory/api/gems/devtools-gems'
The available gems are:
- axe DevTools HTML Cucumber
- axe DevTools HTML RSpec
- axe DevTools HTML Capybara
- axe DevTools HTML Selenium
- axe DevTools HTML Watir
Please refer to the documentation for usage instructions and detailed information about the APIs.
You may uninstall the previous Ruby integrations by running the commands below:
gem uninstall axe-matchers gem uninstall attest-ruby
Other noteworthy changes to the Ruby integration include:
- The environment variable for configuring custom rules has been changed from
AXE_RULESET_PATH. Refer to advanced usage.
- The default ruleset has changed. axe DevTools HTML audits a given page with
wcag2as the default ruleset. No change is required by the end-user. If you want to configure a different ruleset, you may use the respective clauses offered in the Cucumber documentation or the RSpec documentation.
be_accessibleMatchers in RSpec has been renamed to
be accessibleStep definition in RSpec has been renamed to
be axe clean.