[whatwg] <object> element feedback

Christoph Päper christoph.paeper at crissov.de
Tue Aug 19 05:39:46 PDT 2008


Ian Hickson (2008-05-06):
> On Wed, 1 Nov 2006, Christoph Päper wrote:

It's been a while, not that important anyhow.

>> I think it would be helpful to /explicitly/ allow content types  
>> (...) in |type| of |object| to omit the subtype, e.g.:
>>
||   <object type="video" data="foo.mpv"/>       ~= <video  
src="foo.mpv"/>
||   <object type="audio" data="foo.mpa"/>       ~= <audio  
src="foo.mpa"/>
>>   <object type="image" data="foo.png"/>       ~= <img src="foo.png">
>>   <object type="application" data="foo.swf"/> ~= <embed  
>> src="foo.swf"/>
>>   <object type="text" data="foo.txt"/>        ~= <iframe  
>> src="foo.txt"/>
>>
>> Maybe this is all the support for this element type that should be  
>> required from conforming implementations.
>>
>> I could also envision an HTML5 where |alt| was optional for (...) | 
>> img|, which in return was only allowed to be used for optional,  
>> decorative images (...). Every illustration conveying meaning was  
>> then to be embedded using |object| (...) or more sophisticated  
>> methods.
>
> I don't really see how to handle this feedback. We can't really  
> make the changes that would change how <object> works today.

Allowing subtype omission doesn't really change anything, because  
todays browsers do not support it.

The semantic distinction between |object| and |img| (and perhaps any  
of the other four respective element types) is an idea I had in 2006  
and am not too fond of anymore. Not because it's bad, but because it  
would be hard to teach for little gain. And it's mostly and better  
handled by |figure| now.

<!DOCTYPE html>
<title>object subtype omission test</title>
<style>
object, .obj {background: lime}
iframe, img, embed, video, audio, .alt {background: orange}
</style>

<h1>Legend</h1>
<dl>
<dt class="obj">Fallback 0<dd>no <code>type</code>
<dt class="obj">Fallback 1<dd>only major type
<dt class="obj">Fallback 2<dd>major type with trailing slash
<dt class="obj">Fallback 3<dd>any subtype (asterisk)
<dt class="obj">Fallback 4<dd>explicit subtype
<dt class="alt">Fallback X<dd>alternative embedding element
</dl>

<h2>Text</h2>
<object src="foo.txt">Fallback 0</object>
<object type="text" src="foo.txt">Fallback 1</object>
<object type="text/" src="foo.txt">Fallback 2</object>
<object type="text/*" src="foo.txt">Fallback 3</object>
<object type="text/plain" src="foo.txt">Fallback 4</object>
<iframe src="foo.txt">Fallback X</iframe>

<h2>Image</h2>
<object src="foo.png">Fallback 0</object>
<object type="image" src="foo.png">Fallback 1</object>
<object type="image/" src="foo.png">Fallback 2</object>
<object type="image/*" src="foo.png">Fallback 3</object>
<object type="image/png" src="foo.png">Fallback 4</object>
<img src="foo.png" alt="Fallback Xa">Fallback Xb</img>

<h2>Application</h2>
<object src="foo.swf">Fallback 0</object>
<object type="application" src="foo.swf">Fallback 1</object>
<object type="application/" src="foo.swf">Fallback 2</object>
<object type="application/*" src="foo.swf">Fallback 3</object>
<object type="application/" src="foo.swf">Fallback 4</object>
<embed src="foo.swf">Fallback X</embed>

<h2>Video</h2>
<object src="foo.avi">Fallback 0</object>
<object type="video" src="foo.avi">Fallback 1</object>
<object type="video/" src="foo.avi">Fallback 2</object>
<object type="video/*" src="foo.avi">Fallback 3</object>
<object type="video/mpeg" src="foo.avi">Fallback 4</object>
<video src="foo.avi">Fallback X</video>

<h2>Audio</h2>
<object src="foo.mp3">Fallback 0</object>
<object type="audio" src="foo.mp3">Fallback 1</object>
<object type="audio/" src="foo.mp3">Fallback 2</object>
<object type="audio/*" src="foo.mp3">Fallback 3</object>
<object type="audio/mpeg" src="foo.mp3">Fallback 4</object>
<audio src="foo.mp3">Fallback X</audio>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080819/7b2f3f29/attachment.htm>


More information about the whatwg mailing list