Skip to content

Commit

Permalink
self-voicing -> voicing in many comments, see phetsims/tasks#1083
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Mar 25, 2021
1 parent 93d8438 commit d45e66f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions js/john-travoltage/view/AppendageNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class AppendageNode extends Node {

this.initializePosition();

// prototype code related to the self-voicing work
// prototype code related to the voicing work
if ( phet.chipper.queryParameters.supportsVoicing ) {

// describe changes to the arm/leg as the angle changes (during a drag operation) - polite so that it doesn't
Expand All @@ -285,7 +285,7 @@ class AppendageNode extends Node {
const isLeg = appendage instanceof Leg;
if ( !isLeg ) {
sliderProperty.lazyLink( angle => {
appendageUtterance.alert = this.getSelfVoicingObjectResponse( false );
appendageUtterance.alert = this.getVoicingObjectResponse( false );
phet.joist.sim.voicingUtteranceQueue.addToBack( appendageUtterance );
} );
}
Expand All @@ -299,18 +299,18 @@ class AppendageNode extends Node {

// the initial dragging alert does not use the utterance because it must be assertive and
// should interrupt any other utterance being spoken
const alert = this.getSelfVoicingObjectResponse( true );
const alert = this.getVoicingObjectResponse( true );
phet.joist.sim.voicingUtteranceQueue.addToBack( alert );
}
else if ( angleOnStart !== appendage.angleProperty.get() ) {
appendageUtterance.alert = this.getSelfVoicingObjectResponse( true );
appendageUtterance.alert = this.getVoicingObjectResponse( true );
phet.joist.sim.voicingUtteranceQueue.addToBack( appendageUtterance );
}
} );

this.addInputListener( new VoicingInputListener( {
onFocusIn: () => {
const response = this.getSelfVoicingObjectResponse( true );
const response = this.getVoicingObjectResponse( true );
phet.joist.sim.voicingUtteranceQueue.addToBack( response );
},
highlightTarget: this
Expand All @@ -332,12 +332,12 @@ class AppendageNode extends Node {

/**
* Get the "object response" (response describing the slider itself) when a change
* is made to it for the self-voicing feature.
* is made to it for the voicing feature.
* @private
*
* @param {boolean} includeLabel
*/
getSelfVoicingObjectResponse( includeLabel ) {
getVoicingObjectResponse( includeLabel ) {

let objectResponse;
if ( includeLabel ) {
Expand Down Expand Up @@ -435,7 +435,7 @@ class AppendageNode extends Node {
}

/**
* Part of prototype self-voicing. When the user initiates a gesture (anywhere on the screen)
* Part of prototype voicing. When the user initiates a gesture (anywhere on the screen)
* that will initiate drag of the appendageNode.
*
* @public (called by SwipeListener)
Expand All @@ -449,7 +449,7 @@ class AppendageNode extends Node {
}

/**
* Part of the prototype self-voicing feature. User has initiated a gesture on the screen
* Part of the prototype voicing feature. User has initiated a gesture on the screen
* to drag this Node. Moves this appendage based on how far along the screen the user
* moves their finger. Just drags the appendage back and forth as the user drags their
* finger left/right or up/down.
Expand Down Expand Up @@ -531,7 +531,7 @@ class AppendageNode extends Node {
}

/**
* Part of the self-voicing prototype. User has ended a drag of the appendage.
* Part of the voicing prototype. User has ended a drag of the appendage.
* @public (called by SwipeListener)
*
* @param {SceneryEvent} event
Expand Down
6 changes: 3 additions & 3 deletions js/john-travoltage/view/ElectronLayerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ class ElectronLayerNode extends Node {
} );

if ( phet.chipper.queryParameters.supportsVoicing ) {
const selfVoicingAlertString = StringUtils.fillIn( '{{qualitativeDescription}} electrons discharged with {{region}}.', {
const voicingAlertString = StringUtils.fillIn( '{{qualitativeDescription}} electrons discharged with {{region}}.', {
qualitativeDescription: this.getQualitativeChargeDescription( priorCharge - currentCharge ),
region: regionText
} );

const selfVoicingContent = levelSpeakerModel.collectResponses( '', selfVoicingAlertString, '', {
const voicingContent = levelSpeakerModel.collectResponses( '', voicingAlertString, '', {
withCancel: false
} );
phet.joist.sim.voicingUtteranceQueue.addToBack( selfVoicingContent );
phet.joist.sim.voicingUtteranceQueue.addToBack( voicingContent );
}
}

Expand Down
10 changes: 5 additions & 5 deletions js/john-travoltage/view/JohnTravoltageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class JohnTravoltageView extends ScreenView {
tandem.createTandem( 'legNode' ), {
labelContent: appendageLegLabelString,

// prototype self-voicing feature
// prototype voicing feature
voicingHint: voicingContentHintString,
manipulationHint: footInteractionHintString
} );
Expand All @@ -147,7 +147,7 @@ class JohnTravoltageView extends ScreenView {
keyboardMidPointOffset: 0.41,
labelContent: appendageArmLabelString,

// prototype self-voicing feature
// prototype voicing feature
voicingHint: voicingDetailedContentHintString,
manipulationHint: handInteractionHintString
} );
Expand Down Expand Up @@ -202,7 +202,7 @@ class JohnTravoltageView extends ScreenView {
if ( phet.chipper.queryParameters.supportsVoicing ) {
phet.joist.sim.voicingUtteranceQueue.enabled = true;

// when pressed, self-voicing content should speak both the label and the alert
// when pressed, voicing content should speak both the label and the alert
const resetAlert = levelSpeakerModel.collectResponses( resetAllString, resetAllAlertString );
phet.joist.sim.voicingUtteranceQueue.addToBack( resetAlert );
}
Expand Down Expand Up @@ -384,7 +384,7 @@ class JohnTravoltageView extends ScreenView {
resetAllButton
];

// prototype code related to the self-voicing work
// prototype code related to the voicing work
if ( phet.chipper.queryParameters.supportsVoicing ) {

// add the swipe listener
Expand Down Expand Up @@ -509,7 +509,7 @@ class JohnTravoltageView extends ScreenView {
}

/**
* Create the self-voicing scene descriptoin for the "Hint Please" button.
* Create the voicing scene descriptoin for the "Hint Please" button.
* Similar to the PDOM description, but uses a qualitative description of the
* charge.
*
Expand Down

0 comments on commit d45e66f

Please sign in to comment.