Opened 11 years ago

Closed 9 years ago

#12877 closed defect (fixed)

MenuBar: after selecting menu choice, arrow navigation jumps back to first item

Reported by: bill Owned by: bill
Priority: high Milestone: 1.9
Component: Accessibility Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Steps to reproduce:

  1. Open test_Menu.html.
  2. Use keyboard to navigate to "View" MenuBarItem in the MenuBar
  3. Down arrow then space/enter to select one of the options. Focus goes back to "View" MenuBarItem but no selection is shown (i.e. no blue highlighting on any menu item).
  4. Press right arrow
  5. Focus and selection go back to "File" MenuBarItem, rather than to "Help" MenuBarItem

Change History (5)

comment:1 Changed 10 years ago by bill

Description: modified (diff)
Summary: MenBar: after selecting menu choice, arrow navigation jumps back to first itemMenuBar: after selecting menu choice, arrow navigation jumps back to first item

comment:2 Changed 10 years ago by bill

This isn't as bad as I thought. When a choice on the View menu is selected, this code in _MenuBase.js executes:

_closeChild: function(){
        // summary:
        //              Called when submenu is clicked or focus is lost.  Close hierarchy of menus.
        // tags:
        //              private

                // If focus is on a descendant MenuItem then move focus to me,
                // because IE doesn't like it when you display:none a node with focus,
                // and also so keyboard users don't lose control.
                // Likely, immediately after a user defined onClick handler will move focus somewhere
                // else, like a Dialog.
                if(array.indexOf(this._focusManager.activeStack, >= 0){
                        domAttr.set(this.focusedChild.focusNode, "tabIndex", this.tabIndex);

Note that although it's returning focus to the MenuBar, that's just to work around an IE exception.

The expectation is that clicking the MenuItem will do something (of course) and that that something will move the focus somewhere else. The latter may not happen, so that's the case where there's a bug.

comment:3 Changed 10 years ago by bill

Milestone: 1.82.0

comment:4 Changed 9 years ago by bill

Milestone: 2.01.9
Status: newassigned

comment:5 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

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.

Note: See TracTickets for help on using tickets.