Skip to content

Commit

Permalink
set a11y order on LabScreenView, delineate necessary keyboard steps f…
Browse files Browse the repository at this point in the history
…or peg control sliders, see #104
  • Loading branch information
mbarlow12 committed Oct 19, 2017
1 parent b92c407 commit 400d984
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions js/lab/view/LabScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ define( function( require ) {
model.isPlayingProperty.set( false );
}
} );

// a11y
this.accessibleOrder = [ playPanel, pegControls, statisticsAccordionBox, hopperModeControl, histogramModeControl, this.eraserButton];
}

plinkoProbability.register( 'LabScreenView', LabScreenView );
Expand Down
12 changes: 10 additions & 2 deletions js/lab/view/PegControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ define( function( require ) {
trackSize: SLIDER_TRACK_SIZE,
majorTicks: rowsMajorTicks,
majorTickLength: 18,
tickLabelSpacing: 1
tickLabelSpacing: 1,

// a11y
keyboardStep: 2,
shiftKeyboardStep: 1
} );

// major tick labels for slider that controls binary probability
Expand All @@ -94,7 +98,11 @@ define( function( require ) {
trackSize: SLIDER_TRACK_SIZE,
majorTicks: probabilityMajorTicks,
majorTickLength: 18,
tickLabelSpacing: 1
tickLabelSpacing: 1,

// a11y
// no need to delineate specific steps as the HSlider defaults evenly/cleanly divide
// the range
} );

var contentNode = new VBox( {
Expand Down

0 comments on commit 400d984

Please sign in to comment.