Adding a CSS Markup Detective to Drupal
I ran across Holmes by Red Root thanks to Sean Yo and decided to check out how well it would work within a Drupal environment. Turns out that this clever markup detective will dig through & quickly highlight improper HTML markup with quite a lot of accuracy. There's so much power in CSS 3 it's exciting to see how it can be used to enhance accessibility. You can see the full testing suite in action, but I've also deliberately added some errors within this page.
One of the challenges with accessibility is that even when you have a great theme & have evaluated the modules and plugins your site uses, you still have to grapple with user generated content. Holmes, the CSS Markup Detective, is a very simple tool which provides a great way to double check that your content is written effectively. It's also trivial to add this into your existing Drupal theme and have it only loaded when an editor is viewing the site. Use of automated testing tools like WAVE & FAE need to be included in any accessible site and the holmes.css file is a great addition to this suite of validators. None of them will ensure that your site is without barriers, but it will at least alert you to the easy stuff that is often overlooked.
The code is now GPL and all you need to do is download the CSS file. In our case we're using the Genesis theme & so have placed it in our sub-theme's css directory. Then it's simply a matter of editing your template.php and adding this to your YOUR_THEME_preprocess_html() function:
