Skip to main content

Search and Top Navigation

#14107 closed bug (notabug)

Opened August 14, 2015 10:11PM UTC

Closed August 19, 2015 04:57PM UTC

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:
Description

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: https://jsbin.com/lulorasuza/edit?html,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>.

Attachments (0)
Change History (1)

Changed August 19, 2015 04:57PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

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