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

Re: HTML element content models vs. components

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 28 Sep 2011 07:08:47 +0000 (UTC)
To: Roland Steiner <rolandsteiner@chromium.org>
cc: WebApps WG <public-webapps@w3.org>, Dimitri Glazkov <dglazkov@chromium.org>, Dominic Cooney <dominicc@chromium.org>
Message-ID: <Pine.LNX.4.64.1109280702120.29849@ps20323.dreamhostps.com>
On Wed, 28 Sep 2011, Roland Steiner wrote:
>
> Expanding on the general web component discussion, one area that hasn't 
> been touched on AFAIK is how components fit within the content model of 
> HTML elements. Take for example a list ( 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ul-element 
> ):
> 
> <ol> and <ul> have "Zero or more <li> elements" as content model, while 
> <li> is specified to only be usable within <ol>, <ul> and <menu>.
> 
> Now it is not inconceivable that someone would like to create a 
> component <x-li> that acts as a list item, but expands on it. In order 
> to allow this, the content model for <ol>, <ul>, <menu> would need to be 
> changed to accomodate this.

The way to solve this is not to change the content models, it's to use an 
actual <li> and bind it to the component. We should not have authors 
inventing new elements. It doesn't have fallback behaviour, it doesn't 
have semantics that can be interpreted by search engines and accessibility 
tools, it doesn't have default renderings, it doesn't allow for validation 
to catch authoring mistakes, it simply isn't a good design.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 28 September 2011 07:11:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT