I am considering developing a module that regularly (using cron) checks a Drupal site (all or part) against various validation schemes such as the W3C's Markup Validation Service, CSS Validator, and Web Content Accessibility Guidelines 1.0, and the U.S. Section 508 Guidelines. The Drupal core and most of the essential modules already validate nicely against these tests, but obviously any user-submitted code would be at risk. I would hope that if validation holes were found in modules or themes published on Drupal.org, it would be enough to raise issues in the appropriate place to get them plugged.
The admin page could allow an administrator to indicate, using regular expressions, the pages on their site that would be checked, the interval at which to check, and an option list of validators.
Is this something that others would find useful?
Comments
User submissions
I like the idea of checking your own pages, but I don't think it should be used to check against invalid user submissions.
There is already htmlcorrector.module which does some basic HTML well-formedness checks (basically just ensures proper tag closing/nesting), but you could make a similar module which does proper validation.
There is also htmltidy.module which runs every page through html tidy.
htmltidy rocks
Man, I hadn't even seen the htmltidy module. I've used tidy in jEdit and it is indispensable. I think that module is enough for me. I don't suppose a site's code will change enough on a day-to-day basis that a cron-based validator with some kind of e-mail alerting system would be necessary. Nay, that would be anal.
Thanks for the reply.
"The Drupal core and most of
"The Drupal core and most of the essential modules already validate nicely against these tests"
That hasn't been my experience. I get duplicate error with drupal's form code that appears at the bottom of pages for comments. Maybe somebody can explain it?
w3c validation and Drupal
i have found that I can get my sites html validation errors to nil if I use Pushbutton theme but that Theme is not the one I want to use, Chameleon which I prefer creates validation errors.
I am not a Drupal developer, php expert or CSS expert I do not want to have to rewrite the Chameleon theme to get it to validate. I just want to use a CMS to put up my site and have it validate. For that I am finding drupal frustrating.
Drupel's own home page has 13 W3c vaildation errors.
My site is about standards and I want to showcase a CMS that can be used and is compliant and you do not need to be a developer to do it.
In all other respects Drupal is fantastic.
w3c validation and Drupal
Chameleon now validates. In no respects is drupal not now fantastic.
Accessibility
I wrote a page for the handbook about accessibility:
http://drupal.org/node/44661
All the core themes now validate, hurraa!
I'm working on another page about valid markup, one of Drupal's most amazing features. It's quite a complex subject so is taking a while to finish, hopefully I'll have it up for review next month.
Cortext Communications
Drupal Themes & Modules
------------------------------------------
Drupal Specialists: Consulting, Development & Training
Robert Castelo, CTO
Code Positive
London, United Kingdom
----