diff --git a/js/ComboBox.js b/js/ComboBox.js index 1f930826..aa298706 100644 --- a/js/ComboBox.js +++ b/js/ComboBox.js @@ -138,8 +138,6 @@ define( require => { stroke: options.listStroke, lineWidth: options.listLineWidth, visible: false - - //TODO sun#314 need to add a11y options? } ); listParent.addChild( this.listBox ); this.listParent = listParent; // @private @@ -171,7 +169,6 @@ define( require => { this.display = null; // @private listener for 'click outside to dismiss' - // TODO sun#314 handle this logic for a11y too, perhaps on by monitoring the focusout event on the display's root PDOM element this.clickToDismissListener = { down: event => { //TODO scenery#927 is trail.nodes public? should we add Trail.containsNode? diff --git a/js/ComboBoxButton.js b/js/ComboBoxButton.js index 1bd96ee3..92a0ea86 100644 --- a/js/ComboBoxButton.js +++ b/js/ComboBoxButton.js @@ -52,7 +52,6 @@ define( require => { // phet-io tandem: Tandem.optional, - //TODO sun#314 evaluate whether these are still needed now that ComboBoxButton extends RectangularPushButton // a11y labelTagName: 'span', containerTagName: 'div', @@ -160,8 +159,9 @@ define( require => { }; property.link( propertyObserver ); - //TODO sun#314 expand on this comment - // the button is labelledby its own label, and then (second) by itself. Order matters! + // Add aria-labelledby attribute to the button. + // The button is aria-labelledby its own label sibling, and then (second) its primary sibling in the PDOM. + // Order matters! assert && assert( !options.ariaLabelledbyAssociations, 'ComboBoxButton sets ariaLabelledbyAssociations' ); this.ariaLabelledbyAssociations = [ { diff --git a/js/ComboBoxListBox.js b/js/ComboBoxListBox.js index 0ac8e9cc..eb00a6e6 100644 --- a/js/ComboBoxListBox.js +++ b/js/ComboBoxListBox.js @@ -153,8 +153,7 @@ define( require => { super( content, options ); - //TODO sun#314 say more here - // a11y - the list is labeled by the button's label + // a11y - the list box is aria-labelledby its own label sibling this.addAriaLabelledbyAssociation( { otherNode: button, otherElementName: AccessiblePeer.LABEL_SIBLING,