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

Ian Hickson wrote:
> I'd really like to be able to fall back on the <select onchange=""> abuse, 
> since it is easy to define how to make a menu from that, but I don't want 
> to just put an attribute on the <select> element to change its behaviour 
> -- it's got to still be a <select>, just one that happens to not be 
> visible in new UAs, with its semantics wrapped around another level of 
> semantics. The problem is trying to come up with a neat way of doing this 
> while still hitting all the requirements above.

I think <select> isn't a very good basis for menus.  Current (good) 
DHTML menus are richer than selects allow for, with things like nested 
menus.  That can't be simulated with selects.

My interpretation of the use of selects is that it is currently the 
easiest way to implement a certain kind of interaction.  Specifically, 
click-to-open, with good behavior for closing and whatnot.  The best 
implementation I know of is at brainjar: 
http://www.brainjar.com/dhtml/menubar/

Flyover menus (implemented with onmouseover) are more typical and easier 
to write, but they have very bad UI for applications (IMHO only barely 
functional for navigation -- and even when used in navigation they can 
be very disruptive when they form a navigational wrapper around an 
application).  Selects are an expedient compromise -- you click to open, 
they close nicely (e.g., when you click elsewhere on the page, or enter 
some other input element), they look familiar, they don't interact badly 
with other things on the page (all of these are things the brainjar code 
puts substantial effort into fixing).  But presumably an implementation 
of the menu spec would handle all these things properly anyway, so 
that's not an issue.

As for backward compatibility, I an somewhat confused at what the goal 
is; it seems like backward compatibility (as long as you are assuming 
functioning Javascript) isn't that hard to achieve for nearly any markup...?

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

Received on Monday, 28 November 2005 11:08:02 UTC