Accessibility basics in Rails

In most traditional web apps you can achieve a reasonable level of accessibility with semantic HTML and a good page structure. Rails apps are no different. The framework provides lots of handy Action View Helpers and they come with everything you need to make your app accessible. However, just like when writing plain HTML, it's easy enough to forget about crucial attributes and end up with a page that is not accessible.

This website aims to tackle some of the most important accessibility concerns, so you can get the basics right in your Rails application. You can read more about the project here.

Form validation

Custom validation errors are usually skipped by screen readers, unless we explicitly expose them. ARIA live regions and ARIA roles can make your forms accessible to assistive tech users. Read more about accessible form validation in Rails

Document language

Adding a lang attribute to your HTML is an easy win. It helps render the text more accurately, load the correct pronunciation rules, and display video captions correctly. Read more about document language in Rails