W3C home > Mailing lists > Public > public-xhtml2@w3.org > November 2007

a role for object

From: Alessio Cartocci <a.cartocci@webprofession.com>
Date: Tue, 13 Nov 2007 02:51:25 +0100
Message-ID: <263f692a0711121751u39d82de4o3e99b7b3ddb078e@mail.gmail.com>
To: "XHTML WG" <public-xhtml2@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 February 2010 18:12:47 GMT