PolymerElements / iron-menu-behavior

Accessible menu behavior
18 stars 28 forks source link

Moving focus to next item (in paper-menu) does not skip disabled items #57

Closed giltza closed 8 years ago

giltza commented 8 years ago

Description

When using 'paper-menu' where one of the 'paper-item's is disabled, traversing the items using up/down keyboard keys or typing the first letter of one of the item's titles does not skip disabled paper-items.

Expected outcome

Disabled paper-items should not be focus-able and should be ignored when using the following methods: _focusNext, _focusPrevious, focusWithKeyboardEvent in IronMenuBehaviorImpl.

Actual outcome

focusNext/focusPrevious should skip disabled paper-items.

Steps to reproduce

Browsers Affected

bicknellr commented 8 years ago

(partial recap from offline discussion) Here's another PR that's been open on IronSelectableBehavior about supporting a 'disabled' attribute: PolymerElements/iron-selector#107. My main concern with it is that 'disabled' and 'selectable' are different: I think 'disabled' implies what the end user can do, but that it shouldn't prevent the API user from changing the selected state of a 'disabled' item. Maybe the concept of 'disabled' is better handled at the level of IronMenuBehavior? (Or somewhere else higher up than IronSelectableBehavior?)

bicknellr commented 8 years ago

58 has been merged. This behavior is enabled in v1.1.6 .