Validation
Hi All,
Not sure if this is the right place to put this. I have got all of my themes to validate to HTML and CSS standards. Not only that, in all of the classes I have taught, I have always promoted getting code validated. In my opinion this ensures maximum compatability over different browsers and devices, makes it easier to comply with WAI and section 508 and makes debugging easier.
I have had people, past students and people who use my themes saying that there is no point or that my work breaks their site. For example, when using the Devel module with one of my themes, it no longer validates. Now as far as I am concerned this is down to the module and not my theme(s).
Anyway, to the point, I believe in validation, strongly, but would like to hear peoples views on this so
"Do you think themes should validate?"
Secondly, I would like to see, when looking for themes, an easy way to find ones that are valid. Is this something that the Drupal website people could do? Just a check box when creating a theme to say if it is valid? Likewise, something is also needed for modules as many break validation. So in short, is there anything that could be done to the drupal website to highlight if a theme / module is valid?
Regards,
Nick

Demo site
The best themes have a demo site where you can try them out and validate the results to your requirements. Validation is something people disagree on because there are several levels of validation. I use Total Validator to check the XHTML against the schema for XHTML but most people forget that step, using only the W3C validator. Do you want level A, AA, or AAA? AA and AAA cannot be completely checked by a validation program because a human has to listen to the alternative media.
Add in modules can do anything including breaking validation. You cannot guarantee a theme outside of Drupal core modules because add on modules can add in anything. You cannot guarantee a module will produce usable output because it might depend on something, a feature or a class, that is not in a theme.
Some add on modules bring stuff in from other sites and the stuff might not be valid.
What is needed in the long term is a lot of people validating their sites then reporting anomalies back to the theme and module developers. Drupal.org could then let users register a combination of theme and module against a validation test. You could report that theme Shady Lady worked with module ani_lorak to validate as XHTML 1.1 and WCAG Priority 1 (A).
petermoulding.com/web_architect
Hi, I agree with you 100%.
Hi,
I agree with you 100%. I attempt to ensure all of my themes validate using the basic Drupal core installation. As for A, AA, AAA level, that depends on who is creating the site and what for, dosn't it? For example, if I create a theme, and who ever is using it dosn't put in alternate information for an image or link, then straight away the A level is not achieved.
I do like your last idea though, having someway to report back what works and dosn't, especially the differing combinations. I would LOVE to see the Drupal community develop that idea further on the website.
Anyway, thanks for your feedback. If I can get enough comments, I may type up a short article outlining the pros and cons of all of this and a possible way forward.
Regards,
Nick
----------------------------------
Nick Young
www.nickbits.co.uk
"Validation" and "testing for accessibility" are not the same!
Peterx has confused the two; Nick, you clearly understand the difference.
Validation has to do with whether the code complies with the standards set by the W3C for the doctype stated in the declaration. Either it passes or it doesn't. Green light from the corresponding W3C validator, and you're OK.
Having an accessible site means that people who have one or more disabilities can use it just as easily as everyone else. If you comply with the Web Content Accessibility Guidelines (formerly WCAG 1.0; now the more easily applied and tested WCAG 2.0), you can be fairly confident that your site is accessible. But, as Peter points out, a lot of that is still a judgment call. (In a contest, I've seen one judge say a site was not accessible because it had an empty alt tag for the logo. In the training leading up to that contest, another judge had said to keep that alt tag empty and be sure the site owner was identified as the author.)
Themes should pass on both counts, though. In other words, if anything causes the page to either be inaccessible or fail validation, it shouldn't be something inherent to the theme that causes the problem. Code generated by modules should also pass in both areas.
Pages and sites built with themes and modules should also pass on both counts. Just as a person can add an image to your theme and leave out the alt tag, people can add html that fails to validate. If they do that, they should fix their mess.
And the Accessibility group's forum might be a good place to continue this discussion. After all, it isn't really an "issue."
Cliff T
Accessibility needs to be mainstreamed
Wanted to say that accessible themes & modules is a topic that needs to be mainstreamed. Isolating this discussion to the accessibility group restricts it to the keeners who have a passion for this issue. If you're struggling against a particular accessibility issue (like say how to deal the "Read more", "Send to friend" or "Add new comment" strings that all point to different URLs) then it should be posted in that group. If however most Drupal themes don't validate, which is what I found in my survey of themes, then it is a concern for the larger community.
Just like we need to keep good coding practices with the PHP that is developed for Drupal modules, it is important that themes validate with Drupal Core.
--
OpenConcept | SEO | Tech | Screencasts
fixing the docs would be a great start
I think we can start by improving this section of the theme developers guide - http://drupal.org/node/341707
At the moment its rather incomplete and needs a make-over. I could head this up in the new year - I'll take a look in the docs issue queue to see if anything is pending, if not I'll post over there and get the ball rolling.
Until recently, I thought
Until recently, I thought that all web developers understood the importance of validation. For example, to ensure maximum browser compatability, WAI and Section 508 compliance, etc. Several recent comments have made me realise that there are a lot of people, including web developers, that still do not understand the importance. To see how much of a problem this is I have asked two questions (see below) on ask500people.com. Please vote (see links below):
I will give it a week or two for people to vote and comment, then write up my findings.
----------------------------------
Nick Young
www.nickbits.co.uk
I think its very important.
I think its very important. I take it seriously, but like most people I only have so much time in the day to support these various standards.
This is reality for many of us, we want it, but not everyone has the time to learn all these standards and implement them. I can see this being a big problem and perhaps we need to be addressing at the community rather than the individual level, i.e. forming a group or task force to create drop tasks, write documentation and contribute patches for themes and modules.
BTW - some related discussions - http://groups.drupal.org/node/6355 , http://groups.drupal.org/node/6471
Hi, jmburnz, thanks for the
Hi,
jmburnz, thanks for the comments. Totally agree about time being an issue. Thanks for the links, I have seen them before but had forgotten about them. Just so much to remember. I like the idea of a task force. I would be more than willing to help with this, and testing other themes and making suggestions, corrections.
I will look in to how to go about doing so this weekend.
On another note, I did think about the following project. It will be my first module and to be honest, I have no idea how to achieve it, but would help me develop my skills. Anyway, here is the outline:
Over the Christmas period, if I get time, I may start to look at developing a testing suite. The idea, simple, have a page (or something) you can visit (on your own site). This would link to W3C to validate XHTML, CSS, etc. It would then link to Drupal (no idea how yet) and send results together with information on your Drupal install (i.e. Modules). This would then allow people to identify themes that are valid and to what level, but also what modules break that validation. Would welcome thoughts on this.
----------------------------------
Nick Young
www.nickbits.co.uk
Thanks for posting this Nick
Looks like it could be an interesting module. Generally I go for validating the theme & then doing spot validations on a few key pages. Would be nice to have something that runs along though and does it on every page, and then reports issues. I've found that the Web Developer Firefox extension is quite good and allows me to very quickly validate CSS & xHTML. I've been quite frustrated by many of the accessibility tools out there, but WAVE is great.
For ongoing site validation, I am starting to incorporate http://drupal.org/project/htmlpurifier into my designs to ensure that the client can't easily break the validation.
--
OpenConcept | SEO | Tech | Screencasts
http://drupal.org/project/wymeditor
htmlpurifier sounds like a heavy processing overhead. Have you performance tested it? Drupal caches pages until you are logged in. htmlpurifier probably filters before caching. The workload would be heaviest on sites where most visitors are logged in. Worth testing.
WYMeditor, http://drupal.org/project/wymeditor, could help prevent the creation of problems and remove the need for checking the output of every page.
petermoulding.com/web_architect