Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16861 closed defect (fixed)

[regression] MenuBar: keyboard accessibility (arrow keys and enter) issues when repeatedly opening menu

Reported by: spaquette Owned by: bill
Priority: undecided Milestone: 1.9
Component: Dijit Version: 1.9.0a2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Arrow-key and enter-key accessibility for MenuBar with submenus seems to work inconsistently in the master. It works in 1.8 with visualization quirks. There's a bug in 1.9.0a2 (#16784) which prevents the behavior from being observed.

Attached an example based on the Dijit Menus 1.8 demo, but if you just ran that demo off the master this should happen.

To reproduce:

  1. Click on any MenuBar item (mouse or focus+arrow-key+enter).
  1. Click on any item of the submenu that opened (mouse or arrow-key+enter). The MenuBar item is no longer highlit.
  1. Click enter. The submenu will re-open but the MenuBar? item won't highlight (you may see a brief flicker of it sort-of-highlighting in the master).
  1. Try to use the arrow-keys to traverse the submenu; in 1.8, this works, but in the master, the items won't highlight and clicking enter won't click them (step 5 for what happens on enter click). You can't use escape to close the submenu.
  1. Click enter again. In the master, the MenuBar item will highlight and the submenu will close. (In 1.9.0a2 this is where the bug happens.)
  1. Click enter once more. The submenu opens, and you can keyboard traverse its items. If you click a submenu item, the sequence repeats.

Attachments (1)

test_menubar_keyboard.html (2.0 KB) - added by spaquette 7 years ago.
Example of keyboard accessibility in MenuBar? on master

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by spaquette

Attachment: test_menubar_keyboard.html added

Example of keyboard accessibility in MenuBar? on master

comment:1 Changed 7 years ago by spaquette

Woops, left it as General. Sorry. :/

comment:2 Changed 7 years ago by Ed Chatelain

Component: GeneralDijit
Owner: set to bill

comment:3 Changed 7 years ago by bill

Description: modified (diff)
Milestone: tbd1.9
Summary: Keyboard accessibility (arrow keys and enter) in MenuBar[regression] MenuBar: keyboard accessibility (arrow keys and enter) issues when repeatedly opening menu

OK, thanks, I'll take a look. Must be related to trying to revert the Menu to it's "passive" state and clearing this.focusedChild even though the menu is in fact still focused.

comment:4 Changed 7 years ago by bill

Resolution: fixed
Status: newclosed

In [30893]:

Like dijit/form/_ListMixin, created a "selected" property that sets the selected (aka highlighted) MenuItem. In passive mode, there's no selected item, but in active mode, there's (exactly) one. Previously this.focusedChild was overloaded to refer to the selected MenuItem. Fixes #12877, #16861 !strict.

comment:6 Changed 7 years ago by bill

In [30898]:

Add clearSelectedItem parameter to _cleanUp() method for slight code reduction, refs #16861 !strict.

Note: See TracTickets for help on using tickets.