Skip to content

Commit

Permalink
touch interaction cue on alert, see #452
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Oct 28, 2019
1 parent e81188d commit 9a7aea3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions js/balloons-and-static-electricity/BASEA11yStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ define( require => {

//--------------------------------------------------------------------------
// Play Area landmark strings, 'near' or 'at' added through string patterns
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
landmarkNearSweater: {
value: 'sweater'
},
Expand Down Expand Up @@ -717,9 +717,12 @@ define( require => {
combinedChargePattern: {
value: '{{grabbedBalloon}}. {{otherBalloon}}'
},
interactionCue: {
keyboardInteractionCue: {
value: 'Press W, A, S, or D key to move balloon. Space to release.'
},
touchInteractionCue: {
value: 'Drag finger to move balloon. Lift finger to release.'
},

//--------------------------------------------------------------------------
// Balloon sweater rubbing strings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ define( require => {
const balloonNearString = BASEA11yStrings.balloonNear.value;
const locationAndInducedChargePatternString = BASEA11yStrings.locationAndInducedChargePattern.value;
const singleStatementPatternString = BASEA11yStrings.singleStatementPattern.value;
const interactionCueString = BASEA11yStrings.interactionCue.value;
const keyboardInteractionCueString = BASEA11yStrings.keyboardInteractionCue.value;
const touchInteractionCueString = BASEA11yStrings.touchInteractionCue.value;
const balloonLabelWithAttractiveStatePatternString = BASEA11yStrings.balloonLabelWithAttractiveStatePattern.value;
const balloonVeryCloseToString = BASEA11yStrings.balloonVeryCloseTo.value;
const continuousMovementPatternString = BASEA11yStrings.continuousMovementPattern.value;
Expand Down Expand Up @@ -903,7 +904,7 @@ define( require => {
if ( !this.balloonModel.successfulPickUp ) {
description = StringUtils.fillIn( grabbedWithHelpPatternString, {
grabbedAlert: description,
help: interactionCueString
help: phet.joist.sim.supportsTouchA11y ? touchInteractionCueString : keyboardInteractionCueString
} );
}

Expand Down

0 comments on commit 9a7aea3

Please sign in to comment.