diff --git a/js/ComboBoxItem.js b/js/ComboBoxItem.js index eba871ff..7774982f 100644 --- a/js/ComboBoxItem.js +++ b/js/ComboBoxItem.js @@ -22,6 +22,7 @@ define( require => { constructor( node, value, options ) { assert && assert( node instanceof Node, 'invalid node: ' + node ); + assert && assert( !node.accessibleContent, 'accessibleContent is set by ComboBox, use options.a11yLabel' ); options = _.extend( { diff --git a/js/ComboBoxListItemNode.js b/js/ComboBoxListItemNode.js index 05507f79..0cdd59ee 100644 --- a/js/ComboBoxListItemNode.js +++ b/js/ComboBoxListItemNode.js @@ -29,8 +29,6 @@ define( require => { assert && assert( item instanceof ComboBoxItem ); - // TODO sun#314 assert you may not be allowed to have accessibleContent on the item.node, since we set the innerContent on this LI - options = _.extend( { cursor: 'pointer', @@ -82,8 +80,8 @@ define( require => { this.highlightRectangle = highlightRectangle; this.highlightFill = options.highlightFill; - // the focus highlight wraps around the entire item rectangle - itemNodeWrapper.focusHighlight = Shape.bounds( itemNodeWrapper.parentToLocalBounds( this.localBounds ) ); + // focus highlight is fitted to this Node's bounds, so that it doesn't overlap items above/below in the list box + this.focusHighlight = Shape.bounds( this.localBounds ); } /**