Opened 7 years ago

Closed 7 years ago

#14107 closed bug (notabug)

Selectmenu: Does not skip disabled items when menu is open

Reported by: RandScullard Owned by:
Priority: minor Milestone: none
Component: ui.selectmenu Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:


The Selectmenu widget does not skip disabled items when the menu is open and the user uses the up- and down-arrow keys to move through the items. This is inconsistent with the behavior of a native browser <select> element, which does skip the disabled items (as tested on Windows in IE, Firefox, and Chrome).

This jsbin example is a simple comparison of a native <select> element and one with Selectmenu turned on:,js,output

The issue is related to this code in the _move function:

		if ( this.isOpen ) {
			item = this.menuItems.eq( this.focusIndex );
		} else {
			item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
			filter += ":not(.ui-state-disabled)";

Note that it is explicitly only filtering out .ui-state-disabled if the Selectmenu is not open. If this filter were set unconditionally, the behavior would be consistent with the native <select>.

Change History (1)

comment:1 Changed 7 years ago by Scott González

Resolution: notabug
Status: newclosed

This is an intentional decision so that the disabled items are discoverable to non-visual users.

Note: See TracTickets for help on using tickets.