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

Nate H. whatwg at heagy.com
Wed Dec 14 08:48:42 PST 2005


>    First of all, my suggestion is that submenus always have an
> associated <menulabel>.

I've taken <menulabel> to be a text label specifically and wonder
about menus opened from an icon-only, such as would be found on a
toolbar.
--
Nate
 -------
heagy.com


On 12/13/05, Matthew Raymond <mattraymond at earthlink.net> wrote:
> Nathan Heagy wrote:
> > While it is true that authors will want to style their menu buttons it's
> > not true that every menu item would need a label. In that case nesting
> > <menu> inside its label becomes quite ugly with a menu of menus only
> > some of which have labels:
> >
> > <menu>
> >       <menulabel>
> >               Foo
> >               <menu>
> >               ...
> >               </menu>
> >       </menulabel>
> >       <menu>
> >       ...
> >       </menu>
> >       <menulabel>
> >               Foo
> >               <menu>
> >               ...
> >               </menu>
> >       </menulabel>
> > </menu>
>
>    First of all, my suggestion is that submenus always have an
> associated <menulabel>. If the |type| is "popup" (or "context", as Ian
> calls it), then the menu doesn't display unless activated by the
> associated menu label element. Additionally, a |for| element can be used
> to avoid nesting:
>
> | <menu type="menubar">
> |   <li>
> |     <menulabel for="menu1">Foo</menulabel>
> |     <menu id="menu1" type="popup">
> |       ...
> |     </menu>
> |   </li>
> |   <li>
> |     <a href="frobozz.html">Frobozz</a>
> |   </li>
> |   <li>
> |     <menulabel for="menu2">Bar</menulabel>
> |     <menu id="menu2" type="popup">
> |       ...
> |     </menu>
> |   </li>
> | </menu>
>
>    With this model, you can even pull the menus out nesting altogether:
>
> | <menu type="menubar">
> |   <li><menulabel for="menu1">Foo</menulabel></li>
> |   <li><a href="frobozz.html">Frobozz</a></li>
> |   <li><menulabel for="menu2">Bar</menulabel></li>
> | </menu>
> |
> | <menu id="menu1" type="popup">
> |   ...
> | </menu>
> |
> | <menu id="menu2" type="popup">
> |   ...
> | </menu>
>
>    Hmm. The name "context" as a menu |type| is more semantic, but less
> accurate in non-context-menu cases, such as popup menus and submenus.
> The name "popup" is more general, but more presentational.
>


--
Nate
  -------
heagy.com



More information about the whatwg mailing list