From e07398c241fbcf202faac22c0f989487989fdd77 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Sat, 19 Jan 2019 20:07:34 -0700 Subject: [PATCH] set focusable:true in ComboBoxListItemNode options, #445 --- js/ComboBoxListBox.js | 11 ----------- js/ComboBoxListItemNode.js | 1 + 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/js/ComboBoxListBox.js b/js/ComboBoxListBox.js index 57f9b893..5e307f8d 100644 --- a/js/ComboBoxListBox.js +++ b/js/ComboBoxListBox.js @@ -185,12 +185,8 @@ define( require => { // a11y - keep this PDOM attribute in sync this.updateActiveDescendant( nextListItemNode ); - // clear focus for previous item - this.focusedItemNode.focusable = false; - // set focus for next item this.focusedItemNode = nextListItemNode; - this.focusedItemNode.focusable = true; //TODO sun#314 why do we need to set focusable=true? this.focusedItemNode.focus(); break; } @@ -236,17 +232,10 @@ define( require => { const listItemNode = this.listItemNodes[ i ]; if ( this.property.value === listItemNode.item.value ) { this.focusedItemNode = listItemNode; - this.focusedItemNode.focusable = true; this.focusedItemNode.focus(); } } } - else if ( this.focusedItemNode ) { - - // listbox is invisible, clear focus - this.focusedItemNode.focusable = false; - this.focusedItemNode = null; - } } // TODO: sun#314 we don't likely need this anymore diff --git a/js/ComboBoxListItemNode.js b/js/ComboBoxListItemNode.js index 50e01c3c..6b9b09a0 100644 --- a/js/ComboBoxListItemNode.js +++ b/js/ComboBoxListItemNode.js @@ -43,6 +43,7 @@ define( require => { // a11y tagName: 'li', + focusable: true, ariaRole: 'option', a11yLabel: null