W3C home > Mailing lists > Public > www-validator@w3.org > January 2007

Re: Does the validator highlight this widespread mistake?

From: Frank Ellermann <nobody@xyzzy.claranet.de>
Date: Sun, 07 Jan 2007 19:12:19 +0100
To: www-validator@w3.org
Message-ID: <45A13803.3133@xyzzy.claranet.de>

Colin McKenzie wrote:

> But in many websites they aren't always used together, and my emails
> of complaint usually produce blank lack of comprehension that there's
> a problem.

That's beyond of what can be done with a mere syntax check based on a
DTD.  And it's hard to express formally (i.e. rules that could be
checked by a validator), there are too many factors.

Some months ago I've submitted a "tip" trying to address some of these
factors: <http://purl.net/xyzzy/w3c/colour.html>  I guess it was
rejected, the folks pushing for "upgrade your browser" instead of "use
the least common denominator as required for your goals" dominate not
only the W3C.

No validator issuse, it's probably not possible to express that a blue
background with a black foreground is a bad idea, or that a legacy blue
background with a contrasting CSS foreground won't work as expected for
legacy browsers.

What you say is also not entirely true, all browsers I've ever used, as
far as they support colours at all, have black text, blue links, and a
"bright" (white, silver, yellow) background.  Based on that observation
you can risk to manipulate only the background, as long as it stays
"bright" (e.g. bgcolor="cyan" in a table).

And if you change both it's not necessarily good enough, you've to use
the same method (either CSS or legacy, but no mixture), and if you pick
a blue background for texts with links you've also to set a contrasting
colour for links, not only for links.

And you have to add some other way like <em> to highlight texts where
the colour has a meaning, otherwise that meaning is completely lost for
text browsers.  All very easy to discuss in prose, but hard to check
automatically.  Another example, there are browsers which don't support
rgb triples, they want rrggbb, or colour names.

Then you still have to check this manually with colourblind emulators,
it's a PITA.

> Many huge websites - Amazon, Yahoo, my bank, etc etc - have parts
> which define one or the other but not both.

IIRC the blue link on blue background effect for Amazon was not caused
by changing only one of the various attributes.  The fatal error is to
use a legacy bgcolor attribute for a dark background in an area with
links, no amount of additional CSS can fix this for legacy browsers.

You need at least 2 tools for manual checks:  Something like Delorie's
backward compatibility viewer (or a browser where you can disable CSS
to see what happens), and a colourblind emulator.  The validator can't
do this, it's limited to what you can say in a DTD.

Received on Sunday, 7 January 2007 18:16:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:50 UTC