[whatwg] Menus, fallback, and backwards compatibility: ideas wanted

Ian Hickson ian at hixie.ch
Tue Dec 6 16:14:27 PST 2005


On Tue, 29 Nov 2005, Lachlan Hunt wrote:
> 
> After much though, I've refined my original idea and also gone back to 
> Ian's original idea that navigation menus and command are the same 
> structure, only differing in their functionality.
> 
> Each command menu is marked up like this:
> 
> <cmd>
>   <select/>
>   <button/>
> </cmd>
> 
> or with the button and select switched:
> 
> <cmd>
>   <button/>
>   <select/>
> </cmd>
> 
> or with input instead:
> 
> <cmd>
>   <input type="submit"/>
>   <select/>
> </cmd>

...or with <a>, or with <input> on its own, or with any number of other 
types of commands that are described in the draft right now.

> <menu>
>   <cmd> <select/> <button/> </cmd>
>   <cmd> <select/> <button/> </cmd>
>   <cmd> <select/> <button/> </cmd>
> </menu>
> 
> (where each cmd contains a select and a button, as above)

Why not just:

 <menu>
   <li> <select/> <button/> </li>
   <li> <select/> <button/> </li>
   <li> <select/> <button/> </li>
 </menu>

...? Which is basically the same as:

> <menu>
>   <li><a>...</a></li>
>   <li><a>...</a></li>
>   <li><a>...</a></li>
> </menu>

The only problem is that we can't do that, because <menu> is an existing 
element and there is no way to distinguish the above from today's <menu>s.

My current thinking is to have an attribute on the <menu> to distinguish 
the type of menu, from a list of three types: context menu (hidden until 
activated), tool bar/menu bar/menu button/whatever you call it (turns each 
command into a button, and each submenu into a menu button), and the 
default, which is to display as a <ul> (like today).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list