W3C home > Mailing lists > Public > public-html@w3.org > November 2008

Re: Contexts in which <menu> is allowed

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 18 Nov 2008 07:44:58 +0000 (UTC)
To: Henri Sivonen <hsivonen@iki.fi>
Cc: HTMLWG WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0811180738090.25582@hixie.dreamhostps.com>

On Sat, 12 Jan 2008, Henri Sivonen wrote:
> 
> From the draft:
> > 3.18.4. The menu element
> > 
> > Categories
> >     Prose content.
> >     If there is a menu element ancestor: phrasing content.
> 
> Is there a reason why the latter case isn't phrased as:
>      As the only child of a li element whose parent is a menu element.
> OR
>      As a child of a li element whose parent is a menu element.
> ?
> 
> On the surface, either of those would yield more sensible trees than the 
> current spec text. (Also, either of those would be significantly simpler 
> to implement in RELAX NG...)

I've simplified it a lot (allowing both <menu> and <menu><li> to just 
contain arbitary flow content).

You might want to add a warning to the validator for the case where a 
<menu> or <menu><li> where the <menu> is type=context or type=toolbar 
contains a descendant element that defines a command or is an <hr>, 
<menu>, or <select>, but is not a child of a <menu>.

e.g.:

   <menu type="context"><p><a href="x">x</a></p></menu>

...should probably trigger a warning, since the context menu will be 
empty in that case (it wouldn't be if the <p> tags were removed).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 18 November 2008 07:45:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:59 UTC