diff --git a/js/accessibility/voicing/voicingManager.js b/js/accessibility/voicing/voicingManager.js index 0a6eaeb..0ccbd20 100644 --- a/js/accessibility/voicing/voicingManager.js +++ b/js/accessibility/voicing/voicingManager.js @@ -239,27 +239,6 @@ class VoicingManager extends Announcer { queue.splice( index, 1 ); } - /** - * Ask the synth to speak an utterance now (synchronously). - * @private - * - * @param {SpeechSynthesisUtterance} speechSynthesisUtterance - */ - alertNow( speechSynthesisUtterance ) { - const synth = voicingManager.getSynth(); - if ( synth ) { - - // Signify to the utterance-queue that we cannot speak yet until this utterance has finished - this.readyToSpeak = false; - - synth.speak( speechSynthesisUtterance ); - - if ( !this.hasSpoken ) { - this.hasSpoken = true; - } - } - } - /** * @override * @private @@ -434,7 +413,14 @@ class VoicingManager extends Announcer { // but the error event does. In this case signify that speaking has ended. speechSynthUtterance.addEventListener( 'error', endListener ); - this.alertNow( speechSynthUtterance ); + // Signify to the utterance-queue that we cannot speak yet until this utterance has finished + this.readyToSpeak = false; + + this.getSynth().speak( speechSynthUtterance ); + + if ( !this.hasSpoken ) { + this.hasSpoken = true; + } } /**