Skip to content

Commit

Permalink
Revert "testing out a change for #117"
Browse files Browse the repository at this point in the history
This reverts commit e2ed603.
  • Loading branch information
jessegreenberg committed May 23, 2024
1 parent e2ed603 commit ddf55df
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions js/AriaLiveAnnouncer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import stepTimer from '../../axon/js/stepTimer.js';
import Enumeration from '../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../phet-core/js/EnumerationValue.js';
import optionize from '../../phet-core/js/optionize.js';
import platform from '../../phet-core/js/platform.js';
import { PDOMUtils } from '../../scenery/js/imports.js';
import Announcer, { AnnouncerAnnounceOptions, AnnouncerOptions } from './Announcer.js';
import Utterance from './Utterance.js';
Expand Down Expand Up @@ -230,18 +231,15 @@ class AriaLiveAnnouncer extends Announcer {
// https://github.com/phetsims/scenery-phet/issues/491
stepTimer.setTimeout( () => {

// if ( platform.safari ) {
//
// // Using `hidden` rather than clearing textContent works better on mobile VO,
// // see https://github.com/phetsims/scenery-phet/issues/490
// liveElement.hidden = true;
// }
// else {
// liveElement.textContent = '';
// }

// TODO: testing out this change to see if it fixes a VoiceOver problem, see https://github.com/phetsims/utterance-queue/issues/117
liveElement.textContent = '';
if ( platform.safari ) {

// Using `hidden` rather than clearing textContent works better on mobile VO,
// see https://github.com/phetsims/scenery-phet/issues/490
liveElement.hidden = true;
}
else {
liveElement.textContent = '';
}

// Wait until after this timeout to let the UtteranceQueue can announce Utterances again. This delay
// seems to be necessary to force VoiceOver to speak aria-live alerts in first-in-first-out order.
Expand Down

0 comments on commit ddf55df

Please sign in to comment.