Re: CSS2.1 'content', 404 Not Found, and audio files

On Wednesday, August 4, 2004, 1:08:12 PM, fantasai wrote:


f> Mark Schenk pointed this out to me:

f> http://www.w3.org/TR/CSS21/generate.html#content
f>   # The value is a URI that designates an external resource.
f>   # If a user agent cannot support the resource because of
f>   # the media types it supports, it must ignore the resource.

f> The question is, what if the user agent supports the resource
f> but cannot load it (not found, file corrupted, etc.)?

f> Also, it seems we haven't defined fallbacks very well here.
f> If the resource at the URL cannot be loaded as a replaced
f> element, the content value should fail and fall back, not
f> load half-baked strings.

f>    content: "Welcome to " url(welcome.png) "!";

I can understand why you would want the whole thing to fail, but this
should be handled consistently. Equally annoying cases can occur where
the content is a single file, or where a particular background image is
used to convey a warning message,or a number of other cases.

In SVG this is handled by the externalResourcesRequired attribute.

f> Claudio also wants to know what happens if one embeds an audio
f> file in a visual display.

f>    body:before { content: url(welcome-fanfare.mid); }

The audio would play,presumably, but the timing could not be constrained
because in visual media the entire content is displayed at once and
serialization happens when the person reading  it scans it with their
eyes.

This is in contrast to the aural media, which is serialized by the
speech synthesizer; contrast

h2:before { content: url(welcome-fanfare.mid); }

h2 {cue-before: url(welcome-fanfare.mid); }


In the latter case the fanfare willsound justbefore each h2 is read out.

-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 Member, W3C Technical Architecture Group

Received on Wednesday, 4 August 2004 10:34:38 UTC