W3C home > Mailing lists > Public > www-style@w3.org > April 2004

Re: content: url() is bad

From: Dave Shea <dave@mezzoblue.com>
Date: Mon, 12 Apr 2004 09:35:04 -0500
To: www-style@w3.org
Message-Id: <E1BD2We-0002XG-BC@socrates.scdns.net>

> For example,
> 
>    <h1>XYZ Company</h1>
> 
> with:
> 
>    h1 { content: url(xyzcompany-logo); }
> 
> ...is semantically correct.

I believe this has been discussed off-list, but just so it makes it on
here...

I see a problem with this technique. Currently, all but one image
replacement technique I'm aware of suffers from an accessibility problem
that <img> doesn't -- when turning off image downloading, but leaving
CSS enabled (which does happen, albeit rarely, I'm informed) those users
see nothing.

Given that the above technique is literally replacing the content of the
h1, doesn't it stand to reason that if a user has CSS enabled, they
won't see the backup text if their user agent didn't download the image?

So this approach theoretically solves two of the problems with image
replacement (namely bloated markup/CSS, and low compatibility with
screenreaders) while leaving the third open. Actually, come to think of
it, how *would* this be more or less compatible with a screenreader?
Ignoring the new screenreader-specific media type for a moment, current
screenreaders hook into IE's visual rendering; wouldn't this break for
them too, given the replaced text?

More thought needs to be put into this technique before it becomes an
actual suggestion for image replacement. I believe someone (Ian?)
quickly saw a simple way to avoid these problems, revolving around
default values -- what was that, for the benefit of the list?

d.
Received on Monday, 12 April 2004 10:35:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:28 GMT