RE: Downloadable fonts and image replacement

Hello all,

It is proposed in XHTML 2 that @src be available for use anywhere in a
document [1], and that it's behaviour is to allow fallback:

  <p src="holiday.png" srctype="image/png">
    <span src="holiday.gif" srctype="image/gif">
      An image of us on holiday.

When using only one level, I can see it making sense that all the mark-up is
in the document:

  <span src="holiday.gif" srctype="image/gif">
    An image of us on holiday.

since in this case the text "An image of us on holiday" can usefully be used
by the browser, even if the image is successfully loaded.

However, when we start to have images that are fallbacks for other images,
it seems to me that the CSS approach is much better; you could hopefully
define in a stylesheet that if image A fails to load, regardless of where it
appears in the document, then use image B instead. It keeps the mark-up much
neater, since you may have any number of nestings.

I think we probably need both techniques, but I'm cross-posting here because
it would obviously be very good if they were somehow related to each other,
perhaps by defining the 'default styling' for elements with @src. This might
require some tweaking to the CSS definitions, which is why I'm flagging it

Any thoughts?




Mark Birbeck
CEO Ltd.

t: +44 (0) 20 7689 9232

Download our XForms processor from

> -----Original Message-----
> From: 
> [] On Behalf Of Simon Pieters
> Sent: 25 April 2006 11:23
> To:
> Cc:
> Subject: RE: Downloadable fonts and image replacement
> Hi,
> From: Bert Bos <>
> >    CSS3 will include content-replacement on all elements, not just
> >    pseudo-elements. See the <uri> definition in
> >
> >
> >    It lets you do things like this:
> >
> >       /* Use image, failing that use element's content. */
> >       H1 { content: url(sparkly_heading_text.png), contents; } [...]
> >     Fonts and image replacement -
> >       [...]
> >       - Accessibility considerations for image-text replacement
> I think that the following should be equivalent:
>    H1 { content: url(sparkly_heading_text.png); }
>    H1 { content: url(sparkly_heading_text.png), contents; }
> ...because I think that authors will use the first example 
> and expect the contents to be used as a fallback. Many 
> authors don't test to disable images so they won't realise 
> that the contents aren't used as a fallback, and thus the 
> contents won't be accessible to some users.
> Regards,
> Simon Pieters

Received on Tuesday, 25 April 2006 10:52:03 UTC