phetsims / utterance-queue

Alerting library powered by aria-live
MIT License
0 stars 2 forks source link

Tighten up some voicing types #94

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

What I found while reviewing https://github.com/phetsims/joist/issues/873 (mostly unrelated, but had changes to ScreenView voicing code) was that responseCollector could collect a response that was a function, and it would pass that function directly to stringUtils.fillIn

https://github.com/phetsims/utterance-queue/blob/6a48435a915bd55435dd94cdb7fb2c9853e873e6/js/responseCollector.ts#L91-L96

We can tighten that up to just be a fillable value or a Property.

zepumph commented 1 year ago

Types are passing now, and things should much less sloppy. Just because nothing was currently passing it in doesn't mean that couldn't happen in the future.