Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/github/rubocop-rails-accessibility
This repository provides recommended RuboCop configuration and additional accessibility RuboCop Rails cops for use on open source and internal Rails projects.
https://github.com/github/rubocop-rails-accessibility
accessibility rails rubocop rubocop-rails
Last synced: 2 days ago
JSON representation
This repository provides recommended RuboCop configuration and additional accessibility RuboCop Rails cops for use on open source and internal Rails projects.
- Host: GitHub
- URL: https://github.com/github/rubocop-rails-accessibility
- Owner: github
- License: mit
- Created: 2022-08-16T12:34:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T15:50:37.000Z (10 days ago)
- Last Synced: 2025-01-21T11:11:58.298Z (9 days ago)
- Topics: accessibility, rails, rubocop, rubocop-rails
- Language: Ruby
- Homepage:
- Size: 276 KB
- Stars: 32
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# RuboCop Rails Accessibility
This repository provides recommended [RuboCop](https://github.com/rubocop/rubocop) configuration and additional **accessibility RuboCop Rails cops** for use on open source and internal Rails projects.
## Installation
Install the `rubocop-rails-accessibility` gem
```sh
gem install rubocop-rails-accessibility
```or if you use bundler put this in your `Gemfile`
```ruby
gem 'rubocop-rails-accessibility'
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false
```## Usage
You need to tell RuboCop to load RuboCop Rails Accessibility.
Put this into your `.rubocop.yml`.
``` yaml
require:
- rubocop-rails-accessibility
```## Testing
Install all of the required gems
```sh
bundle install
```Run the tests
```sh
bundle exec rake
```## The Cops
All cops are located under
[`lib/rubocop/cop/rails_accessibility`](lib/rubocop/cop/rails_accessibility), and contain
examples/documentation.## Rules
- [RailsAccessibility/ImageHasAlt](guides/image-has-alt.md)
- [RailsAccessibility/NoPositiveTabindex](guides/no-positive-tabindex.md)
- [RailsAccessibility/NoRedundantImageAlt](guides/no-redundant-image-alt.md)## Contributing
If you have any suggestion for how this project could be improved, please read the [contributing guidelines](https://github.com/github/rubocop-rails-accessibility/blob/main/CONTRIBUTING.md).