W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > August 2011

[Bug 13608] Add <menuitem> element

From: <bugzilla@jessica.w3.org>
Date: Wed, 03 Aug 2011 21:20:14 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QoirO-0005aD-GT@jessica.w3.org>

--- Comment #6 from Jonas Sicking <jonas@sicking.cc> 2011-08-03 21:20:14 UTC ---
It's a lot more clear to have the meaning of an element depend on its name,
rather than its name and its context.

In the example in


the <command> element has three distinct meanings:

1. Create actual command which can be triggered using various UI features
2. Create a menu item
3. Create a toolbar button

As a result, the markup looks terribly confusing. Why does the <command> in the
menu have to refer to another <command>? How and why are they different? Can a
<command> in a menu refer to a <command> in a toolbar?

The markup in that example would be a lot easier to understand if it looked

    <command id="copy" label="Copy" onclick="copy()">
    <command id="cut" label="Cut" onclick="cut()">
    <command id="paste" label="Paste" onclick="paste()">
    <button command="copy">
    <button command="cut">
    <button command="paste">
   <menu type="context">
    <menuitem command="copy">
    <menuitem command="cut">
    <menuitem command="paste">
   <accesskey command="copy" key="meta c">
   <accesskey command="cut" key="meta x">
   <accesskey command="paste" key="meta v">
    <button command="paste">

I'd also be fine with a separate <toolbarbutton> to separate from normal form

Additionally, if there's an error in the code that outputs the markup such that
nesting is a bit wrong, you end up with elements that still have the right
semantics (though they might no longer work properly due to having the wrong
parent), rather than drastically change their semantics since they now have a
parent of a different type.

I don't see what trying to abstract all forms of UI into a single <command>
element gives us?

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 3 August 2011 21:20:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:59 UTC