Skip to content

Commit

Permalink
delay focus so JAWS always enters forms mode when picking up balloon,…
Browse files Browse the repository at this point in the history
… see #293
  • Loading branch information
jessegreenberg committed Sep 13, 2017
1 parent 9cf2b1a commit ab82736
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/balloons-and-static-electricity/view/BalloonNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ define( function( require ) {
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Shape = require( 'KITE/Shape' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var Timer = require( 'PHET_CORE/Timer' );
var Utterance = require( 'SCENERY_PHET/accessibility/Utterance' );
var UtteranceQueue = require( 'SCENERY_PHET/accessibility/UtteranceQueue' );
var Vector2 = require( 'DOT/Vector2' );
Expand Down Expand Up @@ -571,8 +572,11 @@ define( function( require ) {
accessibleDragNode.accessibleHidden = false;
accessibleDragNode.focusable = true;

// focus
accessibleDragNode.focus();
// focus, but behind a short delay so that JAWS correctly enters 'forms' mode when picking up
// the balloon, see https://github.com/phetsims/balloons-and-static-electricity/issues/293
Timer.setTimeout( function() {
accessibleDragNode.focus();
}, 100 );

// the balloon is picked up for dragging
model.isDraggedProperty.set( true );
Expand Down

0 comments on commit ab82736

Please sign in to comment.