Skip to content

Commit

Permalink
add getter to Sim.js to access Display.prototype.utteranceQueue, phet…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 20, 2019
1 parent 6074cea commit 3abfa17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/NavigationBarSoundToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ define( require => {
self.setAccessibleAttribute( 'aria-pressed', !value );

soundUtterance.alert = value ? simSoundOnString : simSoundOffString;
phet.joist.sim.display.utteranceQueue.addToBack( soundUtterance );
phet.joist.sim.utteranceQueue.addToBack( soundUtterance );
};
soundEnabledProperty.lazyLink( pressedListener );
this.setAccessibleAttribute( 'aria-pressed', !soundEnabledProperty.get() );
Expand Down
8 changes: 8 additions & 0 deletions js/Sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,14 @@ define( require => {

this.navigationBar.accessibleVisible = visible;
this.homeScreen && this.homeScreen.view.setAccessibleVisible( visible );
},

/**
* Get the single utteranceQueue instance to be used by the PhET sim to make aria-live alerts.
* @public
*/
get utteranceQueue(){
return this.display.utteranceQueue;
}
} );
} );

0 comments on commit 3abfa17

Please sign in to comment.