W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] [WA1] menus

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 6 Jan 2006 01:58:23 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0601060155120.2856@dhalsim.dreamhost.com>
On Sat, 13 Nov 2004, Laurens Holst wrote:
> Ian Hickson wrote:
> > > #  <menubar>
> > > #   <li>
> > > #    <a href="#file">File</a>
> > > #    <menu id="file">
> > > #     <li><button type="button" onclick="fnew()">New...</button></li>
> > > 
> > > To:
> > > 
> > >  <menubar>
> > >   <li>
> > >    <menulabel><a href="#file">File</a></menulabel>
> > >    <menu id="file">
> > >     <li><button type="button" onclick="fnew()">New...</button></li>
> > > 
> > > This would make it a lot better, from a structural point of view. It would
> > > also remain backwards compatible.

It's now something like:

   <menu type="toolbar">
    <li>
     <p>File:</p>
     <menu label="File">
      <li><button type="button" onclick="fnew()">New...</button></li>

(The <p> element is any block-level content, it's ignored in HTML5 UAs.)


> I think neither option suggested above is good.

I agree that neither method quoted above is good.


> Just take a look at how <label (for="")> is used in HTML and copy that. 
> It is a sensible method.

I considered that. I think it is better to use an attribute on the <menu>, 
though, because in practice I think it's likely that most cases of 
fallback will want slightly different text (e.g. different punctuation) 
than you would want in a menu (e.g. "File:" vs "File...").

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 5 January 2006 17:58:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:25 UTC