Skip to content

Commit

Permalink
accessible order for ObservationWindow, fix a few labels, see #201'
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Oct 30, 2019
1 parent 7904bfe commit dcaa448
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/common/MoleculesAndLightA11yStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ define( require => {
interactionHintString: {
value: 'Look for light source slider to play.'
},
lightSourceSliderString: {
value: 'Light Source Slider'
lightSourceString: {
value: 'Light Source'
},
isOffAndPointsString: {
value: 'is off and points'
Expand Down
3 changes: 3 additions & 0 deletions js/moleculesandlight/view/ObservationWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ define( require => {
children: [ phaseItem, geometryLabelItem, geometryDescriptionItem ]
} );
this.addChild( descriptionList );

// PDOM - description list first
this.accessibleOrder = [ descriptionList, photonEmitterNode ];
}

moleculesAndLight.register( 'ObservationWindow', ObservationWindow );
Expand Down
5 changes: 3 additions & 2 deletions js/photon-absorption/view/EmissionRateControlSliderNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ define( require => {
const THUMB_RECTANGLE_HEIGHT = 45; // a background rectangle behind the thumb, made visible when the slider has focus

// a11y strings
const lightSourceSliderString = MoleculesAndLightA11yStrings.lightSourceSliderString.value;
const lightSourceString = MoleculesAndLightA11yStrings.lightSourceString.value;
// var lightSourceTitlePattern = MoleculesAndLightA11yStrings.lightSourceTitlePattern.value;
const emissionSliderDescriptionString = MoleculesAndLightA11yStrings.emissionSliderDescriptionString.value;
const emitsPhotonsQuicklyString = MoleculesAndLightA11yStrings.emitsPhotonsQuicklyString.value;
Expand Down Expand Up @@ -74,8 +74,9 @@ define( require => {

// a11y
labelTagName: 'label',
labelContent: lightSourceSliderString,
labelContent: lightSourceString,
descriptionContent: emissionSliderDescriptionString,
appendDescription: true,
numberDecimalPlaces: 1,
keyboardStep: sliderRange.getLength() / 10,
shiftKeyboardStep: sliderRange.getLength() / 20,
Expand Down

0 comments on commit dcaa448

Please sign in to comment.