W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: Custom tags over wire, was Re: HTMLElement.register--giving components tag names

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 02 Sep 2011 11:30:40 +0200
To: "Dimitri Glazkov" <dglazkov@chromium.org>
Cc: "WebApps WG" <public-webapps@w3.org>, "Dominic Cooney" <dominicc@chromium.org>, "Alex Russell" <alex@dojotoolkit.org>
Message-ID: <op.v06cpe2d64w2qv@annevk-macbookpro.local>
On Wed, 31 Aug 2011 19:29:28 +0200, Dimitri Glazkov  
<dglazkov@chromium.org> wrote:
> To put it differently, you want to start with a well-known element in
> markup, and, through the magic of computing, this element _becomes_
> your component in the DOM tree. In other words, the markup:
> <button becomes="x-awesome-button">Weee!!</button>
> Becomes:
> <x-awesome-button>Weee!!</x-awesome-button>

This does not work for assistive technology. That is, you would still have  
to completely implement the <button> element from scratch, including all  
its semantics such as keyboard accessibility, etc.

What we need is not a becomes="" attribute (that renames an element and  
therefore forgoes its semantics) but rather a way to get complete control  
over a semantic element and tweak aspects of it. Otherwise creating such  
controls is prohibitively expensive and only useful if you have vast  

Examples of elements that should not be replaced but could be changed by a  
binding: Having a sortable binding for <table>; Exposing cite="" on  
<blockquote>; Turning a <select> listing countries into a map.

Having some way to mint custom elements as a last resort may very well  
make sense too, but I think the emphasis should be on enhancing existing  
elements as that is less complex (for authors anyway) and more accessible.

And FWIW, I do not think that has to be seen as "Decorator"  
http://wiki.whatwg.org/wiki/Behavior_Attachment as for the examples I  
listed above I would expect the binding to be permanent. (I would also  
expect you could expose additional DOM members, etc.)

Anne van Kesteren
Received on Friday, 2 September 2011 09:31:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:23 UTC