Skip to content

Commit

Permalink
make AccessibleNumberSpinner an input of type range with spinbutton a…
Browse files Browse the repository at this point in the history
…ria-roledescription, #497
  • Loading branch information
zepumph committed Apr 24, 2019
1 parent cd8e042 commit c88288b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/accessibility/AccessibleNumberSpinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c88288b

Please sign in to comment.