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 2e6305d commit f2c73bd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion friction_a11y_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ <h3>PDOM & Descriptions for Friction</h3>
var PDOMCopy = PDOMRoot.cloneNode( true );

// get the alert dom elements from the iframe's inner document
var ariaLiveElementsContainer = innerWindow.phet.joist.sim.display.utteranceQueue.getAriaLiveContainer();
var ariaLiveElementsContainer = innerWindow.phet.joist.sim.utteranceQueue.getAriaLiveContainer();

// get the alert dom elements from the PDOM copy
var alertList = document.getElementById( 'alert-list' );
Expand Down
4 changes: 2 additions & 2 deletions js/friction/view/FrictionAlertManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ define( require => {
} );

temperatureJiggleUtterance.alert = string;
phet.joist.sim.display.utteranceQueue.addToBack( temperatureJiggleUtterance );
phet.joist.sim.utteranceQueue.addToBack( temperatureJiggleUtterance );
},

/**
* Alert the state of the cool and settled atoms.
* @public
*/
alertSettledAndCool: function() {
phet.joist.sim.display.utteranceQueue.addToBack( atomsJiggleTinyBitTempCoolString );
phet.joist.sim.utteranceQueue.addToBack( atomsJiggleTinyBitTempCoolString );
},

// Threshold that must be reached from initial temp to new temp to alert that the temperature changed, in amplitude (see model for more info)
Expand Down
2 changes: 1 addition & 1 deletion js/friction/view/FrictionGrabDragInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ define( require => {
if ( this.successfullyInteracted ) {
alert = alerts.subsequent;
}
phet.joist.sim.display.utteranceQueue.addToBack( alert );
phet.joist.sim.utteranceQueue.addToBack( alert );
};

super( wrappedNode, options );
Expand Down
4 changes: 2 additions & 2 deletions js/friction/view/describers/BreakAwayDescriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ define( require => {
// If there aren't any more atoms to break away
if ( this.model.numberOfAtomsEvaporated >= FrictionModel.NUMBER_OF_EVAPORABLE_ATOMS ) {
assert && assert( this.alertedBreakAwayProperty.value, 'If this is the first alert, then we have problems' );
phet.joist.sim.display.utteranceQueue.addToFront( BREAK_AWAY_NONE_LEFT );
phet.joist.sim.utteranceQueue.addToFront( BREAK_AWAY_NONE_LEFT );
}
else {
phet.joist.sim.display.utteranceQueue.addToFront( this.alertedBreakAwayProperty.value ? BREAK_AWAY_THRESHOLD_AGAIN : BREAK_AWAY_THRESHOLD_FIRST );
phet.joist.sim.utteranceQueue.addToFront( this.alertedBreakAwayProperty.value ? BREAK_AWAY_THRESHOLD_AGAIN : BREAK_AWAY_THRESHOLD_FIRST );
}

this.alertedBreakAwayProperty.value = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ define( require => {
* @private
*/
alertMaxTemp() {
this.alert( () => { phet.joist.sim.display.utteranceQueue.addToBack( this.maxTempUtterance ); } );
this.alert( () => { phet.joist.sim.utteranceQueue.addToBack( this.maxTempUtterance ); } );
}

/**
Expand Down

0 comments on commit f2c73bd

Please sign in to comment.