From 385f1a4b19d8369d9595be1b9f8f88caaf1cd269 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 19 Nov 2019 15:47:08 -0900 Subject: [PATCH] add getter to Sim.js to access Display.prototype.utteranceQueue, https://github.com/phetsims/utterance-queue/issues/7 --- js/ohms-law/view/ControlPanel.js | 4 ++-- ohms-law_a11y_view.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ohms-law/view/ControlPanel.js b/js/ohms-law/view/ControlPanel.js index ada27cf..6e52047 100644 --- a/js/ohms-law/view/ControlPanel.js +++ b/js/ohms-law/view/ControlPanel.js @@ -104,7 +104,7 @@ const ValueChangeUtterance = require( 'UTTERANCE_QUEUE/ValueChangeUtterance' ); const fixedCurrent = Util.toFixed( currentProperty.get(), OhmsLawConstants.CURRENT_SIG_FIGS ); voltageUtterance.alert = self.getValueChangeAlertString( letterVString, sizeChange, sizeChange, fixedCurrent ); - phet.joist.sim.display.utteranceQueue.addToBack( voltageUtterance ); + phet.joist.sim.utteranceQueue.addToBack( voltageUtterance ); } } }, @@ -139,7 +139,7 @@ const ValueChangeUtterance = require( 'UTTERANCE_QUEUE/ValueChangeUtterance' ); iSizeChange += Math.abs( currentChange ) > twoSizeCurrentThreshhold ? ' ' + aLotString : ''; resistanceUtterance.alert = self.getValueChangeAlertString( letterRString, rSizeChange, iSizeChange, fixedCurrent ); - phet.joist.sim.display.utteranceQueue.addToBack( resistanceUtterance ); + phet.joist.sim.utteranceQueue.addToBack( resistanceUtterance ); } }; diff --git a/ohms-law_a11y_view.html b/ohms-law_a11y_view.html index cdc22b9..b4579ea 100644 --- a/ohms-law_a11y_view.html +++ b/ohms-law_a11y_view.html @@ -269,7 +269,7 @@

PDOM & Descriptions for Ohm's Law

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' );