W3C home > Mailing lists > Public > www-style@w3.org > May 2002

Re: Accessibility issues in CSS3 Colour

From: Etan Wexler <ewexler@stickdog.com>
Date: Sat, 18 May 2002 06:01:11 -0700
To: Joe Clark <joeclark@joeclark.org>, www-style@w3.org
Message-ID: <3CE5EE27.26874.3A01B1F@localhost>
Joe Clark commented on the Color module Working Draft:

> >      * If you use a background image or set the background color, 
> >then be sure to set the various text colors as well.
> I wish that advice were fine-tuned. If you have a CSS that does 
> nothing but add a background colour and you assume foreground will 
> inherit (I use these all the time), it is actually better not to set 
> the foreground so that the background-setting style will be more 
> easily applied to a range of entities.

The only reason that one should not set background and foreground together is to avoid 
interrupting the appearance of a background image on some other element's boxes.

Ignoring this advice can lead to blatantly inaccessible color combinations.  Imagine that 
a user has a style sheet as follows.

    h1 { color: yellow; background: brown }

Now imagine that the user encounters a document with 'h1' elements that uses a style 
sheet as follows.

    h1 { background: yellow }

The result is unreadable text.

> The CSS validator warns me all 
> the time about this even though I of all people know what I'm doing. 
> I suppose the validator cannot quite be educated enough to know when 
> the user is smart or stupid. And anyway, they're just warnings, not 
> errors.

The validator can take a directive not to issue warnings.

Etan Wexler <mailto:ewexler@stickdog.com>
Received on Saturday, 18 May 2002 09:17:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:01 UTC