xhtml-validation problem

xhtml-validation problem

by James Ballard -
Number of replies: 6
Hi

We have developed a new theme for our site and I have been asked to assess its accessibility. The first stage is to eliminate the minor xhtml errors so that all pages validate. I have cleared up the home page to validate transitional and CSS, but when I use the validation on a course page view.php?id=2, for example, I recieve the No DOCTYPE found! error stemming from:

Error Line 1 column 0: no document type declaration; will parse without validation.
<meta http-equiv="refresh" content="0; url=http://vle.barkingcollege.ac.uk/teach
however the page source does include the DOCTYPE from the header.htm file in the theme. Viewing the source code I can copy and paste the code and validate it successfully, but this is inconvenient and I wondered if this a normal problem or whether I may be missing something.

The site can be found at
http://vle.barkingcollege.ac.uk/teach
however only the first page is accessible without a login, although I can supply any source codes that may be of use to solve this.

Yours
James
Average of ratings: -
In reply to James Ballard

Re: xhtml-validation problem

by David Scotson -

Have you tried the Web Developer Extension for Firefox? As well as many other excellent tools it allows you to "Validate local HTML" which automatically takes the page you are looking at and submits it as a form to the W3C validator (i.e. the equivalent of cutting and pasting the source).

On the other hand, I believe the reason you can't validate internal pages is because the validator isn't logged in as a user and so gets redirected to the login page. I believe you can create a special login for it, but can't remember how off the top of my head. Ah, found it, Martin suggests creating a user called w3cvalidator.

In reply to David Scotson

Re: xhtml-validation problem

by James Ballard -
Thanks,

I didn't realise the Web Developer Extension local validation was working like that. Not sure what I thought, but that certainly helps speeds up the process.

The login for w3cvalidator makes sense as well, but I can't seem to get it to work. Have tried it as admin, teacher, and student but I always get directed to the login page. We were hoping to add the validation links to our footer but currently they will only successfully validate on the first page. Any ideas?

Yours,
James
In reply to James Ballard

Re: xhtml-validation problem

by David Scotson -

A glance at some of the relevant Moodle code suggests it only allows the validator in when you are using the standardxhtml theme. This is a wise security precaution as otherwise it only checks the user agent (which is easy to change in many browsers).

You could change that code to the name of your theme, or change your theme to standardxhtml to test it. Just remember not to set your site live like that.

In reply to David Scotson

Re: xhtml-validation problem

by Urs Hunkler -
Picture of Core developers

Dear David,

these very important facts about validation Moodle pages should be described in the MoodleDocs. Could you find some time to write a short description for MoodleDocs? Your writing help with MoodleDocs would be great and a big advantage for the documentation.

Perhaps you have seen that MoodleDocs has a Scrapbook area as you proposed it in one of your postings. It's somehow waiting for your contributions wink

Thank you very much for considering to contribute
Urs

In reply to David Scotson

Re: xhtml-validation problem

by James Ballard -
Thanks for the help and advice.

I'll stick with validating the pages locally and then explain this on the site somewhere and just include the validation links on the homepage which does not require a login to access.