W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: data-* attributes [was: Re: ISSUE-41/ACTION-97 decentralized-extensibility]

From: Shelley Powers <shelley.just@gmail.com>
Date: Mon, 19 Oct 2009 11:31:12 -0500
Message-ID: <643cc0270910190931j2212a594g6cc6ccdf29a8479d@mail.gmail.com>
To: James Graham <jgraham@opera.com>
Cc: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>, Anne van Kesteren <annevk@opera.com>, Adrian Bateman <adrianba@microsoft.com>, Jonas Sicking <jonas@sicking.cc>, "Tab Atkins Jr." <jackalmage@gmail.com>, Tony Ross <tross@microsoft.com>, "public-html@w3.org" <public-html@w3.org>
On Mon, Oct 19, 2009 at 10:23 AM, James Graham <jgraham@opera.com> wrote:
> Leif Halvard Silli wrote:
>>
>> Shelley Powers On 09-10-19 14.19:
>>
>>> On Mon, Oct 19, 2009 at 7:13 AM, Anne van Kesteren <annevk@opera.com>
>>> wrote:
>>>>
>>>> On Mon, 19 Oct 2009 14:03:33 +0200, Shelley Powers
>>>> <shelley.just@gmail.com>
>>>> wrote:
>>>>>
>>>>> Anne, but then don't we have the use of URIs with namespaces? The only
>>>>> difference is we specify the URI in one place and make a small, easy
>>>>> to use alias for use elsewhere. If anything forcing people to repeat
>>>>> an entire URI with each class name...that could add up, quickly and
>>>>> significantly.
>>>>
>>>> I wasn't aware that the concept of distributed extensibility or
>>>> decentralized extensibility came with a particular syntax. I'm not
>>>> convinced
>>>> that authors will have trouble with long identifiers. I actually think
>>>> identifiers with a level of indirection will be more difficult to
>>>> handle.
>>>>
>>>>
>>>>> And that doesn't account for the need to extend HTML with elements.
>>>>> Class names could possibly work as attributes, but not as elements.
>>>>> With namespaces we can create both elements and attributes. A superior
>>>>> option.
>>>>
>>>> For the widgets scenario one could just use data-* attributes. Also, a
>>>> lot
>>>> of added complexity is not necessarily superior in my book.
>>>
>>> But data-* are neither decentralized, nor particularly extensible. In
>>> fact, we've determined in previous discussions that they're not meant
>>> to be used for anything other than by an author for a single author's
>>> needs.
>>
>> In that regard, I wonder why SVGweb operates with a data-path="" attribute
>> in the Internet Explorer part of that solution ...
>
> Unless I have misunderstood something, that is a perfectly acceptable use of
> data-*; a third party js-library is not considered independent of the site
> (since the site must decide to import the js-library into its pages).
>
> To take a slightly different example, it is OK to have data-marquee that is
> used by a script that the author includes in the page to implement marquee
> effects. But it is not permitted for a user agent to provide its own marquee
> effects based on the presence of a marquee attribute.
>
> Is the distinction clear now? It is likely that the spec needs clarification
> on this point.
>

It is, but data-* does a poor job.

SVGWeb can use a name, another JS library use the same name, and if a
person wants to use both JS libraries together, they're screwed.

The fact that data-* had no ability to enforce a consistent name clash
prevention shows they're really not useful for decentralized
extensibility.

And I can see a follow up message from Tab, about how they also don't
work if the point is to aggregate the data outside of the page (RDFa).


Shelley
Received on Monday, 19 October 2009 16:31:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:50 GMT