W3C home > Mailing lists > Public > public-html@w3.org > February 2013

Re: using the data* attribute to identify element sub roles

From: Charles McCathie Nevile <chaals@yandex-team.ru>
Date: Mon, 18 Feb 2013 14:23:30 +0100
To: "Robin Berjon" <robin@w3.org>, "Steve Faulkner" <faulkner.steve@gmail.com>
Cc: "HTMLWG WG" <public-html@w3.org>
Message-ID: <op.wspd5go9y3oazb@chaals.local>
On Mon, 18 Feb 2013 10:49:08 +0100, Steve Faulkner  
<faulkner.steve@gmail.com> wrote:

> Hi Robin,
>> We made a promise that data-* is an extension point. My understanding  
>> is that we're also committed never to standardise an element or  
>> attribute name with a >>dash in it (again, extensibility promise). So  
>> it would certainly be a bad idea to hijack data-* for something we put  
>> in the standard.
>
> cool, good to know.
>
>> I'm not sure what you're trying to do exactly, but it looks to me like  
>> you'd want a subrole attribute?
>
> sounds like it.

Personally I doubt it. You're getting into the area where there is a lot  
of possible information, and it is hard to predict what you will want  
until you realise that you predicted wrong and want something you can't  
have.

So unless your subrole attribute is just a container for something like  
RDFa or ┬Ádata, or you have a lot of experience with this and think you can  
predict the subroles, I suggest that you want something more flexible for  
now, so in a few years you have enough data to start codifying the common  
things. Even then, I think it is useful to be able to do the complicated  
things, because they become common quite quickly.

cheers

Chaals

> regards
> Steve
>
> On 18 February 2013 08:55, Robin Berjon <robin@w3.org> wrote:
>> On 18/02/2013 08:26 , Steve Faulkner wrote:
>>> NOTE: this is just a wild idea.
>>>
>>> allow the data attribute [1] to be used to identify element sub
>>> roles:
>>>
>>> examples:
>>>
>>> <h1>heading</h1> <p data-p="subheading">subheading</p>
>>>
>>>
>>> <article data-article="comment"> blog post comment </article>
>>>
>>> allow data-elementname="subRole" pairs to be added to a public
>>> registry.
>>>
>>> thoughts?
>>
>> We made a promise that data-* is an extension point. My understanding  
>> is that we're also committed never to standardise an element or  
>> attribute name with a >>dash in it (again, extensibility promise). So  
>> it would certainly be a bad idea to hijack data-* for something we put  
>> in the standard.
>>
>> I'm not sure what you're trying to do exactly, but it looks to me like  
>> you'd want a subrole attribute?
>>
>> --Robin Berjon - http://berjon.com/ - @robinberjon
>
>



-- 
Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex
chaals@yandex-team.ru Find more at http://yandex.com
Received on Monday, 18 February 2013 13:24:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:37 UTC