From feff87d79a77545af1ea7219521494a3ce2d123a Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Wed, 1 Feb 2023 14:53:39 -0700 Subject: [PATCH] include a space in utterance for waking chromebooks, https://github.com/phetsims/friction/issues/328 --- js/SpeechSynthesisAnnouncer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/SpeechSynthesisAnnouncer.ts b/js/SpeechSynthesisAnnouncer.ts index 4847ffe..4da7388 100644 --- a/js/SpeechSynthesisAnnouncer.ts +++ b/js/SpeechSynthesisAnnouncer.ts @@ -453,7 +453,9 @@ class SpeechSynthesisAnnouncer extends Announcer { this.timeSinceWakingEngine += dt; if ( !synth.speaking && this.timeSinceWakingEngine > ENGINE_WAKE_INTERVAL ) { this.timeSinceWakingEngine = 0; - synth.speak( new SpeechSynthesisUtterance( '' ) ); + + // This space is actually quite important. An empty string began breaking chromebooks in https://github.com/phetsims/friction/issues/328 + synth.speak( new SpeechSynthesisUtterance( ' ' ) ); } } }