From dcaa4487f63a574b58249365e5e11ee00368c179 Mon Sep 17 00:00:00 2001 From: Jesse Date: Wed, 30 Oct 2019 17:52:53 -0400 Subject: [PATCH] accessible order for ObservationWindow, fix a few labels, see #201' --- js/common/MoleculesAndLightA11yStrings.js | 4 ++-- js/moleculesandlight/view/ObservationWindow.js | 3 +++ js/photon-absorption/view/EmissionRateControlSliderNode.js | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/js/common/MoleculesAndLightA11yStrings.js b/js/common/MoleculesAndLightA11yStrings.js index 2004ee98..3c94b74a 100644 --- a/js/common/MoleculesAndLightA11yStrings.js +++ b/js/common/MoleculesAndLightA11yStrings.js @@ -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' diff --git a/js/moleculesandlight/view/ObservationWindow.js b/js/moleculesandlight/view/ObservationWindow.js index 5f7e3dc8..776cec9b 100644 --- a/js/moleculesandlight/view/ObservationWindow.js +++ b/js/moleculesandlight/view/ObservationWindow.js @@ -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 ); diff --git a/js/photon-absorption/view/EmissionRateControlSliderNode.js b/js/photon-absorption/view/EmissionRateControlSliderNode.js index 4efed0d8..c30faf55 100644 --- a/js/photon-absorption/view/EmissionRateControlSliderNode.js +++ b/js/photon-absorption/view/EmissionRateControlSliderNode.js @@ -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; @@ -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,