[whatwg] Menus, fallback, and backwards compatibility: ideas wanted
Matthew Raymond
mattraymond at earthlink.net
Wed Dec 7 04:35:41 PST 2005
Ian Hickson wrote:
> On Tue, 29 Nov 2005, Matthew Raymond wrote:
>
>>Well, what I don't like about this scenario is that we end up with a lot
>>of different markup in <menu>:
>>
>>| <menu>
>>| <a/>
>>| <cmd/>
>>| <command/>
>>| <li/>
>>| <menulabel/>
>>| <menu label=""/>
>>| </menu>
>
>
> So the situation would be:
>
> <menu x="y">
> <li> Z </li>
> <li> Z </li>
> <li> Z </li>
> </menu>
>
> ...or:
>
> <menu x="y">
> Z
> Z
> Z
> </menu>
>
> ...where "Z" is one of the following:
>
> <command>
> <a>
> <button>
> <input> [1]
> <menu>
> <select> <option> </select> [2]
>
> [1] assuming type="" is one of radio, checkbox, button, submit, reset,
> move-up, move-down, add, or remove.
> [2] (optionally with a <button/>, <input/>, or <label/> element)
>
> ...and all other content is ignored (and could be used for fallback).
Sort of. I'm leaning towards having all elements but <option> nested
in an <li> element, though. It just seems to have better semantics, and
it also allows you to use multiple elements to build a menu item, like
having an <img>, a <input type="checkbox"> and a <label> in the same
<li> to create a menu item with a checkbox and an icon.
> Not quite sure how to get the label for nested <menu> elements yet.
I fail to see what's wrong with using the activation of <menulabel>
to display menus. It allows handling of both menus that appear when you
press a "button" (which could be the default styling of <menulabel>
outside of a <menu>) and submenus within a menu:
| <menu>
| <li>
| <menulabel for="submenu">Submenu Label</menulabel>
| <menu id="submenu"/>
| </li>
| </menu>
I believe you already state that <menu> elements are hidden until
activated when they have a label, so I don't see the problem.
> Also not quite sure how to make all this styleable, especially for the
> toolbar type of <menu>. Although... maybe with XBL2's xbl:pseudo="" stuff
> we can make use of that. Hmm.
Should we be using <menu> for toolbars at all?
More information about the whatwg
mailing list