phetsims / utterance-queue

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

priorityProperty needs to work while an Utterance is added to multiple UtteranceQueues #47

Closed jessegreenberg closed 2 years ago

jessegreenberg commented 2 years ago

Just noticed while working on https://github.com/phetsims/utterance-queue/issues/46. I don't think adding the same Utterance to multiple UtteranceQueues will work with the implementatoin of annoumcenetCompleteEmitter and priorityProperty.

const myUtterance = new Utterance( { alert: 'This is a test alert' });

descriptionUtteranceQueue.addToBack( myUtterance );
voicingUtteranceQueue.addToBack( myUtterance );

When one Announcer emits the announcementCompleteEmitter listeners on the utterancePriorityListenerMaps will be removed from both queues...

jessegreenberg commented 2 years ago

That isn't true, the announcementCompleteEmitter is specific to the announcer...I must be getting tired, this can be closed.