- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Tue, 25 Apr 2006 11:51:04 +0100
- To: <www-style@w3.org>, <www-html@w3.org>
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. </span> </p> 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. </span> 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 up. Any thoughts? Regards, Mark [1] http://www.w3.org/TR/xhtml2/mod-embedding.html#s_embeddingmodule Mark Birbeck CEO x-port.net Ltd. e: Mark.Birbeck@x-port.net t: +44 (0) 20 7689 9232 b: http://internet-apps.blogspot.com/ w: http://www.formsPlayer.com/ Download our XForms processor from http://www.formsPlayer.com/ > -----Original Message----- > From: www-style-request@w3.org > [mailto:www-style-request@w3.org] On Behalf Of Simon Pieters > Sent: 25 April 2006 11:23 > To: bert@w3.org > Cc: www-style@w3.org > Subject: RE: Downloadable fonts and image replacement > > > Hi, > > From: Bert Bos <bert@w3.org> > > CSS3 will include content-replacement on all elements, not just > > pseudo-elements. See the <uri> definition in > > http://www.w3.org/TR/css3-content/#inserting3 > > > > 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:07 UTC