Re: content: url() is bad

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

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

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?


Received on Monday, 12 April 2004 10:35:16 UTC