Closed jessegreenberg closed 1 year ago
I thought we decided to not voice empty strings, so I was curious why this empty Utterance is getting added to the UtteranceQueue. Indeed, I see this which is trying to prevent it.
Perhaps that check should use Utterance.alertableToText
to check for emtpy content.
I reviewed with @zepumph who reminded me that Utterance.alertableToText
may have side effects and cannot be used in common code like that. Instead, we are going to add the check right to AccessibleValueHandler. We did this in the above commit. I tested ratio-and-proportion after the change. Closing.
Over in a usage in paper-land (https://github.com/phetsims/paper-land) we found that Utterances unrelated to an AccessibleValueHandler are never getting heard because an Utterance with an empty alert is getting voiced by the AccessibleValueHandler at the end of interaction.
As a workaround in paper-land, we added a high
priority
value to the Utterance we need to hear after moving a slider. But it would be best if AccessibleValueHandler didn't attempt to speak an Utterance with empty content.