W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2005

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

From: Nate H. <whatwg@heagy.com>
Date: Wed, 14 Dec 2005 10:48:42 -0600
Message-ID: <f183e14d0512140848v4ec1f5e6pf8522f32439aabf4@mail.gmail.com>
>    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
Received on Wednesday, 14 December 2005 08:48:42 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC