[whatwg] [WA1] menus
lholst at students.cs.uu.nl
Fri Nov 12 16:06:48 PST 2004
Ian Hickson wrote:
>># <a href="#file">File</a>
>># <menu id="file">
>># <li><button type="button" onclick="fnew()">New...</button></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.
> What's the (practical) difference? So long as we define the menu as being
> labelled by the previous element, the two cases above are equivalent.
For both semantics and user interface behaviour. Note by the way that a
<label> tag already exists so I see no need to create a new one.
I think neither option suggested above is good. Just take a look at how
<label (for="")> is used in HTML and copy that. It is a sensible method.
If you click on the label, if there is an appropriate element (in this
case, menu) inside, it will be selected. If you place the menu outside
the label, the for="" will link it to the menu's ID and all will be well.
I find the 'define as being labelled by previous element' a rather
quirky definition, and certainly inconsistent. That is how things are
done in say, MathML, but not in HTML.
Ushiko-san! Kimi wa doushite, Ushiko-san!!
More information about the whatwg