From c88288bb8c8bf95511dfbc6eb21a4e8903dc2ce2 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 23 Apr 2019 17:30:20 -0800 Subject: [PATCH] make AccessibleNumberSpinner an input of type range with spinbutton aria-roledescription, https://github.com/phetsims/sun/issues/497 --- js/accessibility/AccessibleNumberSpinner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/accessibility/AccessibleNumberSpinner.js b/js/accessibility/AccessibleNumberSpinner.js index dda02403..e9037269 100644 --- a/js/accessibility/AccessibleNumberSpinner.js +++ b/js/accessibility/AccessibleNumberSpinner.js @@ -97,8 +97,9 @@ define( function( require ) { assert && assert( options.inputType === undefined, 'AccessibleNumberSpinner sets inputType' ); optionsToMutate.inputType = 'range'; - assert && assert( options.ariaRole === undefined, 'AccessibleNumberSpinner sets ariaRole' ); - optionsToMutate.ariaRole = 'spinbutton'; + // TODO: we might use this instead of a role description, see https://github.com/phetsims/sun/issues/497 + // assert && assert( options.ariaRole === undefined, 'AccessibleNumberSpinner sets ariaRole' ); + // optionsToMutate.ariaRole = 'spinbutton'; this.mutate( optionsToMutate ); @@ -152,8 +153,7 @@ define( function( require ) { // number spinners should only deal in integers this.setAccessibleAttribute( 'step', 1 ); - // TODO: we might use this instead of an actual role, see https://github.com/phetsims/sun/issues/497 - // this.setAccessibleAttribute( 'aria-roledescription', 'spinbutton' ); + this.setAccessibleAttribute( 'aria-roledescription', 'spinbutton' ); // a callback that is added and removed from the timer depending on keystate var downCallback = null;