diff --git a/js/FaucetNode.js b/js/FaucetNode.js index 729755839..5ecda3202 100644 --- a/js/FaucetNode.js +++ b/js/FaucetNode.js @@ -88,7 +88,10 @@ define( function( require ) { tandem: Tandem.required, phetioType: FaucetNodeIO, - phetioEventType: 'user' + phetioEventType: 'user', + + // a11y - when using keyboard, flowRateProperty will round to nearest keyboardStep of AccessibleSlider + roundToStepSize: true }, options ); assert && assert( ( 1000 * options.tapToDispenseAmount / options.tapToDispenseInterval ) <= maxFlowRate ); @@ -279,7 +282,6 @@ define( function( require ) { self.mutate( options ); // mix accessible slider functionality into this node - options.roundToStepSize = true; this.initializeAccessibleSlider( flowRateProperty, new Property( new Range( 0, maxFlowRate ) ), diff --git a/js/NumberControl.js b/js/NumberControl.js index 76b1c8ca4..4edf16592 100644 --- a/js/NumberControl.js +++ b/js/NumberControl.js @@ -117,7 +117,8 @@ define( function( require ) { phetioType: NumberControlIO, // a11y - groupFocusHighlight: true + groupFocusHighlight: true, + roundToStepSize: true }, options ); @@ -215,7 +216,6 @@ define( function( require ) { // where it makes no sense to call them startDrag and endDrag. startDrag: options.sliderStartCallback || options.startCallback, endDrag: options.sliderEndCallback || options.endCallback, - roundToStepSize: true, tandem: options.tandem.createTandem( 'slider' ) } ); diff --git a/js/SpectrumSlider.js b/js/SpectrumSlider.js index 06b2f59e2..48e5028bb 100644 --- a/js/SpectrumSlider.js +++ b/js/SpectrumSlider.js @@ -91,7 +91,10 @@ define( function( require ) { cursorStroke: 'black', // phet-io - tandem: Tandem.required + tandem: Tandem.required, + + // a11y - should valueProperty round to the nearest interval of AccessibleSlider stepSize when using keyboard? + roundToStepSize: true }, options ); @@ -312,7 +315,6 @@ define( function( require ) { }; // mix accessible slider functionality into HSlider - options.roundToStepSize = true; var rangeProperty = new Property( new Range( options.minValue, options.maxValue ) ); this.initializeAccessibleSlider( valueProperty, rangeProperty, new BooleanProperty( true ), options ); }