a role for object

Dear all,
I am looking at <object> element, which I want to "investigate"
furthermore to make some tests in a XHTML2 document, so I was asking
myself if a role for object elements should be assigned too.
Usually we have objects identified or even classified by their type
attribute, and that's clear expecially for multimedia plugins; for
example <object type="video/quicktime" data="file.mov"> shows that the
"physical" object is a video file, compressed and delivered in the
Apple QuickTime format.

But what about a different object, like a Flash-based one? For example
<object type="application/x-shockwave-flash" data="file.swf"> shows
clearly the type of resource that is being rendered, but we don't know
more about this resource, the real role of this embedded application;
that's because role attribute has semantic purpose, type just defines
content type for data.
So that embedded Flash-based application could be a slideshow viewer,
a video player or an mp3 player, and we miss his contextual role.

Using role we should have:

<object role="video" type="application/x-shockwave-flash"
data="file.swf"> (video player)
<object role="audio" type="application/x-shockwave-flash"
data="file.swf"> (audio/mp3 player)
<object role="presentation" type="application/x-shockwave-flash"
data="file.swf"> (slideshow viewer)

We could use role to describe the purpose of an image too:

<object role="illustration" type="image/x-png" data="file.png"
alt="description">

...and so on.

It is true that a situation like <object role="audio" type="audio/ogg"
data="file.ogg"> would suggest a sort of redundancy, but it would also
remark separation between context and data.

IMHO an <object> is more powerful with the power of role.

Your comments are welcome!

Best regards
Alessio

---
Alessio Cartocci
International Webmasters Association / The HTML Writers Guild
http://www.iwanet.org

Received on Tuesday, 13 November 2007 01:51:39 UTC