RuboCop Rails Accessibility
This repository provides recommended RuboCop configuration and additional accessibility RuboCop Rails cops for use on open source and internal Rails projects.
Installation
Install the rubocop-rails-accessibility gem
gem install rubocop-rails-accessibilityor if you use bundler put this in your Gemfile
gem 'rubocop-rails-accessibility'
gem "rubocop-performance", require: false
gem "rubocop-rails", require: falseUsage
You need to tell RuboCop to load RuboCop Rails Accessibility.
Put this into your .rubocop.yml.
inherit_gem:
rubocop-rails-accessibility:
- config/default.ymlTesting
Install all of the required gems
bundle installRun the tests
bundle exec rakeThe Cops
All cops are located under
lib/rubocop/cop/rubocop-rails-accessibility, and contain
examples/documentation.
Rules
- RuboCop::Cop::Accessibility::ImageHasAlt
- RuboCop::Cop::Accessibility::NoPositiveTabindex
- RuboCop::Cop::Accessibility::NoRedundantImageAlt
Contributing
If you have any suggestion for how this project could be improved, please read the contributing guidelines.