Re: Validator Vs PHP

On Mon, 20 May 2002, David Hughes wrote:

> Hi,
>
> I am the Web Manager for Central Scotland Police.  I have been testing my
> site to ensure that it meets the correct standards and is accessible to
> all.  Whilst using your Validator I found that when I escaped quotation
> marks in PHP, the Validator flagged up that it was not acceptable.

As Tim pointed out, your PHP is not what your server will send to the
browser, so you've validated the wrong thing.  If it's going to be
a problem to ensure you validate the generated HTML, the solution is
Site Valet, and I'll be happy to supply you with it.

>	  This
> as you can gather is a bit of a problem to me, since it is required that
> the Police sites meet these standards.

<aside>
Thank you for taking your responsibilities seriously - far too many don't.
I guess you'll be well-placed to be the expert within the police when
the s**t hits the fan somewhere they've been less diligent.
</aside>

If you mean the broader issue of accessibility standards - as opposed to
(just) that of validation, you have other violations of the WCAG that
validation won't show up.  You have *a lot* of mid-1990s presentational
markup that should properly be replaced by CSS.  Using a strict doctype
will help (the one you've used was intended for legacy documents in 1998).
And of course I'll have to suggest running your markup through Page
Valet, which offers accessibility checking in addition to validation.

> I know there are other errors in the page, some of which are due to
> JavaScript (which is also causing me problems) and others that I am
> currently in the process of solving.

Keep the javascript in a separate file (use <script src="...">).

-- 
Nick Kew

Available for contract work - Programming, Unix, Networking, Markup, etc.

Received on Saturday, 25 May 2002 21:51:58 UTC