[whatwg] Thoughts on Context and Popup Menus for Web Applications

Matthew Paul Thomas mpt at myrealbox.com
Fri Jan 6 02:58:02 PST 2006


On 6 Jan, 2006, at 2:54 PM, Ian Hickson wrote:
>
> On Sun, 14 Nov 2004, Matthew Thomas wrote:
>>
>> On 11 Nov, 2004, at 5:11 AM, Matthew Raymond wrote:
>>> ...
>>>    Who's to say the UA couldn't just append the menu to the context 
>>> menu? Or append the browser context menu as a submenu?
>>
>> Reasonableness. Shortcut menus (aka context menus) become more 
>> difficult to use the more items they have (as closeness to screen 
>> edges require that they open in a direction other than southeast), 
>> and submenus of shortcut menus are extremely difficult to use for the 
>> same reason squared.
>
> Do you know of a method that could be used that would not suffer from
> these problems?

The usual method is for the app developer to place a visible menubutton 
next to the relevant control (e.g. the list of mail folders in Apple 
Mail), next to the currently selected item (e.g. a selected e-mail 
address in Apple Mail), or inside the relevant text field (e.g. the 
search fields in Firefox, Safari, Thunderbird, and many other apps). 
These menus are much simpler than a UA-items-plus-app-items menu would 
be, because they don't contain the UA items.

So one useful addition to HTML would be a way of specifying a menu for 
a text field, where a menu item is either a mode (with text and an 
optional icon) or text (which replaces the current contents of the 
field). The most common use case for this would be changing the scope 
of a search for the former, and choosing a recent search string for the 
latter.

Another useful addition would be a way of recognizing part of the 
contents of a text field as an entity that has its own menu (maybe by 
specifying a set of characters as entity delimiters), so that the UA 
can display a menubutton next to that text when the item is selected 
(and also let an entity be selected in one click). The most common use 
case for this would be editing a list of keywords or tags applied to an 
item, like photos in Flickr, goals in 43 Things, posts in Weblogs, and 
so on. Probably the second most common use case would be to make 
addressing as easy in a Webmail app as it is in Apple Mail.

As for placing menubuttons at arbitrary positions, that should be 
pretty simple once menubuttons are supported at all.

> ...
>> I think we may be venturing into "no practical solution for the
>> platforms some user agents are running on" territory again.
>
> This would be unfortunate. It is very clear that there is a need for 
> Web applications to be able to provide context-sensitive commands. 
> Windows Live Local (formely MSN Virtual Earth) provides a context menu 
> on its maps, and it makes a lot of sense.

Then that's very poor design on their part. Since that menu opens on 
mouseup, so it wouldn't interfere with a drag, they could just as 
easily require a normal click to open the menu rather than a 
right-click.

As it is, a large proportion of people using Windows Live Local won't 
realize that those functions exist, because they require a right mouse 
button that such people either never use or (less commonly) don't have.

> Would we not want to allow a more semantic and accessible way of doing 
> that?
> ...

Context menus aren't particularly accessible no matter how they're 
implemented, since there's no hint that they even exist. A menubutton, 
though, could be tabbed to even if it had appeared only because the 
element it was inside had been selected or focused.

-- 
Matthew Paul Thomas
http://mpt.net.nz/




More information about the whatwg mailing list