Skip to content

Commit

Permalink
implement particle placement highlighting using select menu, phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 30, 2017
1 parent e24681a commit a4f4149
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions js/accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,8 @@ define( function( require ) {
* for a DOM element. This will create a new DOM element for the parent container with the desired role, and
* replace it in the DOM.
* @public
*
* @param {string} ariaRole - role for the element, see
*
* @param {string} ariaRole - role for the element, see
* https://www.w3.org/TR/html-aria/#allowed-aria-roles-states-and-properties
* for a lsit of roles, states, and properties.
*/
Expand Down Expand Up @@ -833,7 +833,16 @@ define( function( require ) {
*/
setFocusHighlight: function( focusHighlight ) {
this._focusHighlight = focusHighlight;

var isFocussed = false;
if ( this.isFocussed() ) {
isFocussed = true;
}
this.invalidateAccessibleContent();

// Reset the focus after invalidating the content.
isFocussed && this.focus();

},
set focusHighlight( focusHighlight ) { this.setFocusHighlight( focusHighlight ); },

Expand Down Expand Up @@ -1122,7 +1131,7 @@ define( function( require ) {
/**
* Get whether this node's dom element is currently focussed.
* @public
*
*
* @return {boolean}
*/
isFocussed: function() {
Expand Down

0 comments on commit a4f4149

Please sign in to comment.