Re: Making all elements and attributes that contain hyphens valid

On Wed, Oct 16, 2013 at 10:39 PM, James Graham <james@hoppipolla.co.uk> wrote:
> On 16/10/13 12:07, Silvia Pfeiffer wrote:
>
>> So, in your opinion, should we change
>>
>> http://www.w3.org/html/wg/drafts/html/master/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes
>> to only apply to private attributes,
>>
>> and add to
>>
>> http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#extensibility
>> the suggestion to use a custom prefix xxx-* for libraries?
>
>
> Maybe I should read more context here,

yup ;-)

> but that's exactly what data- is
> already for. If you embed a library in your page, your page isn't
> independent of that library and so the library doesn't count as "software
> that is independent of the site that uses the attributes". That clause is
> supposed to forbid using data-* for e.g. microformats where one might write
> microformat-consuming software that is entirely decoupled from the site the
> markup appears on.
>
> Given this, I don't understand why you would want xxx-foo rather than
> data-xxx-foo.

Because libraries have not followed that advice, e.g. Angular uses
ng-* and the web components spec are not following that advice either.

Silvia.

Received on Wednesday, 16 October 2013 12:00:09 UTC