This post originated from an RSS feed registered with Ruby Buzz
by Eric Stewart.
Original Post: Testing Rails Application Accessibility
Feed Title: Ponderings On Ruby
Feed URL: http://blog.eric-stewart.com/category/programming-ruby.rss
Feed Description: This is the Ruby related section of Eric Stewart's weblog. These entries will be the commentary of a long time Java/C++ programmer that started exploring Ruby in 2003.
As I mentioned previously, I have been working on a Rails plugin to help check the accessibility of pages in a Rails project.
I was inspired by Scott Raymond’s assert_valid_markup plugin for Rails and decided to whip up a similar plugin for testing the accessibility of pages in my current Rails project.
Using
You will be able to write a functional test that does something like:
def test_indexget:indexassert_accessibleend
I had really wanted to polish this some more before putting it out there for others to use, but I have been slow at finding the time so I’m making it available. It has been working well on my current project but there is much that can be done to improve it. It is still really rough around the edges and your mileage may vary.
You will probably get more mileage out of it by pairing it up with assert_valid_markup, as invalid markup usually triggers some sort of accessibility problem.
Installing
Check out the source from Subversion, or preferable use Rails own script/plugin script to help install it. All you have to do (from the root of your rails project) is: