phetsims / utterance-queue

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

Can `canAnnounceProperties` be TReadOnlyProperty? #99

Closed jessegreenberg closed 1 year ago

jessegreenberg commented 1 year ago

In https://github.com/phetsims/friction/issues/314 I wasn't allowed to do this

    const contextResponseUtterance = new Utterance( {
      priority: Utterance.MEDIUM_PRIORITY,
      voicingCanAnnounceProperties: [ voicingManager.voicingFullyEnabledProperty ]
    } );

because voicingFullyEnabledProperty is a TReadOnlyProperty and the canAnnounceProperty API require TProperty, Using a TReadOnlyProperty works and it doesn't look like the Properties of canAnnounceProperties need to be settable. Id like to broaden the API.

jessegreenberg commented 1 year ago

I went ahead in the above commit, @zepumph are you OK with this?

zepumph commented 1 year ago

Yes very good and very smart. Thanks.

jessegreenberg commented 1 year ago

Thanks!