Opened 12 years ago

Closed 12 years ago

#8856 closed enhancement (duplicate)

MenuItem: Accelerator keys need infrastructure

Reported by: Joseph Scheuhammer Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.3.0b2
Keywords: Cc: Becky Gibson, [email protected]
Blocked By: Blocking:


While testing menus for keyboard a11y, I noticed that some menu items have acceelerator keys. They did not work.

The reason is: while MenuItem.js provides a way to specify the accelerator key combination, there isn't any analogous way to connect a handler for the key-combo. In fact, there is a comment in the code: "... there is no infrastructure to actually catch and execute these accelerators". See also #8322.

I have a misgiving about this. It's misleading in that the ability to specify the accelerator key suggests that that is all that is needed, when in fact doing so has no effect. If this is a future feature, then developers need a warning that this infrastructure is missing.

FWIW, I'd like to see something along the lines of a method such as:

setAccelKeyHandler(/*String*/ accelKey, /*Object|null*/ context, /*Function*/ handler)

It should a method of some basic object (_Widget.js?) since widgets other than menu items might have accelerator keys, for example, Buttons.

Change History (2)

comment:1 Changed 12 years ago by dante

n00bish question, but what about accesskey ... is that already accounted for wrt to ARIA? can we reuse that and normalize it ala onDijitClick on a per-instance basis?

comment:2 Changed 12 years ago by bill

Cc: [email protected] added
Resolution: duplicate
Status: newclosed
Summary: Menu Item: Accelerator keys need infrastructureMenuItem: Accelerator keys need infrastructure

Yup, this is explained in the API doc:

// accelKey: String
//		Text for the accelerator (shortcut) key combination.
//		Note that although Menu can display accelerator keys there
//		is no infrastructure to actually catch and execute these
//		accelerators.
accelKey: "",

and is listed already in #6423 more or less.

Rawld Gill offered to contribute an infrastructure for this so waiting on that.

Note: See TracTickets for help on using tickets.