Skip to content

Commit

Permalink
remove assertive Utterance for radiation change alerts, see #192
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg authored and jbphet committed Sep 10, 2022
1 parent 060a09d commit ec90a29
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions js/common/view/GasConcentrationAlerter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import NumberProperty from '../../../../axon/js/NumberProperty.js';
import Utils from '../../../../dot/js/Utils.js';
import optionize, { EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import Alerter, { AlerterOptions } from '../../../../scenery-phet/js/accessibility/describers/Alerter.js';
import AriaLiveAnnouncer from '../../../../utterance-queue/js/AriaLiveAnnouncer.js';
import Utterance from '../../../../utterance-queue/js/Utterance.js';
import greenhouseEffect from '../../greenhouseEffect.js';
import ConcentrationModel, { ConcentrationControlMode, ConcentrationDate } from '../model/ConcentrationModel.js';
Expand Down Expand Up @@ -100,15 +99,6 @@ class GasConcentrationAlerter extends Alerter {

private previousImmediateNotificationModelState: PreviousImmediateNotificationModelState;

// An Utterance for the alert that describes radiation redirection from sky back to earth. It is announced after
// a change in concentration. It is assertive because we want this initial change to interrupt any stale alerts
// after the change in concentration.
private readonly radiationRedirectionUtterance = new Utterance( {
announcerOptions: {
ariaLivePriority: AriaLiveAnnouncer.AriaLive.ASSERTIVE
}
} );

// Utterances that describe the changing scene and concentration when controlling by date. Using
// reusable Utterances allows this information to "collapse" in the queue and only the most
// recent change is heard when rapid updates happen.
Expand Down Expand Up @@ -308,8 +298,7 @@ class GasConcentrationAlerter extends Alerter {
// there was some change to the concentration.
if ( this.model.isInfraredPresent() && currentConcentration !== this.previousPeriodicNotificationModelState.concentration ) {
const radiationRedirectingAlert = RadiationDescriber.getRadiationRedirectionDescription( currentConcentration, this.previousPeriodicNotificationModelState.concentration );
this.radiationRedirectionUtterance.alert = radiationRedirectingAlert;
radiationRedirectingAlert && this.alert( this.radiationRedirectionUtterance );
radiationRedirectingAlert && this.alert( radiationRedirectingAlert );
}

// Then, description of the changing surface temperature - again, only if there is some change in the
Expand Down

0 comments on commit ec90a29

Please sign in to comment.