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 dd4afee commit d16c70b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions js/molarity/view/molarityAlertManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ define( require => {
this.sliderUtterance.alert = StringUtils.fillIn( atMaxConcentrationAlertString, {
concentration: this.concentrationDescriber.getCurrentConcentrationClause( true )
} );
phet.joist.sim.display.utteranceQueue.addToBack( this.sliderUtterance );
phet.joist.sim.utteranceQueue.addToBack( this.sliderUtterance );
}

/**
Expand All @@ -145,8 +145,8 @@ define( require => {
this.saturationUtterance.alert = this.concentrationDescriber.getSaturationChangedString();

// clears the utteranceQueue to remove utterances from previous saturation region, then adds the saturation utterance.
phet.joist.sim.display.utteranceQueue.clear();
phet.joist.sim.display.utteranceQueue.addToFront( this.saturationUtterance );
phet.joist.sim.utteranceQueue.clear();
phet.joist.sim.utteranceQueue.addToFront( this.saturationUtterance );
}

/**
Expand All @@ -156,7 +156,7 @@ define( require => {
alertNoSolute() {
assert && assert( !this.concentrationDescriber.hasSolute(), 'no solute alert triggered with solute in the beaker' );
this.sliderUtterance.alert = noSoluteAlertString;
phet.joist.sim.display.utteranceQueue.addToBack( this.sliderUtterance );
phet.joist.sim.utteranceQueue.addToBack( this.sliderUtterance );
}

/**
Expand All @@ -165,7 +165,7 @@ define( require => {
*/
alertSoluteChanged() {
this.soluteUtterance.alert = this.soluteDescriber.getSoluteChangedAlertString( this.useQuantitativeDescriptionsProperty );
phet.joist.sim.display.utteranceQueue.addToBack( this.soluteUtterance );
phet.joist.sim.utteranceQueue.addToBack( this.soluteUtterance );
}

/**
Expand All @@ -177,7 +177,7 @@ define( require => {
this.valuesVisibleUtterance.alert = valuesVisibleProperty ?
solutionValuesCheckedAlertString :
solutionValuesUncheckedAlertString;
phet.joist.sim.display.utteranceQueue.addToBack( this.valuesVisibleUtterance );
phet.joist.sim.utteranceQueue.addToBack( this.valuesVisibleUtterance );
}

/**
Expand Down Expand Up @@ -216,7 +216,7 @@ define( require => {
}

this.sliderUtterance.alert = alertText;
phet.joist.sim.display.utteranceQueue.addToBack( this.sliderUtterance );
phet.joist.sim.utteranceQueue.addToBack( this.sliderUtterance );
}


Expand All @@ -243,7 +243,7 @@ define( require => {
}

this.sliderUtterance.alert = alertText;
phet.joist.sim.display.utteranceQueue.addToBack( this.sliderUtterance );
phet.joist.sim.utteranceQueue.addToBack( this.sliderUtterance );
}
}

Expand Down
2 changes: 1 addition & 1 deletion molarity_a11y_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ <h3>PDOM & Descriptions for Molarity</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

0 comments on commit d16c70b

Please sign in to comment.