From 1a440ffc7cd16aa18060c5a4f7cb1cb793b75311 Mon Sep 17 00:00:00 2001 From: Jesse Greenberg Date: Thu, 8 Feb 2018 18:08:41 -0700 Subject: [PATCH] sliders heading and description, see #126 --- .../ResistanceInAWireA11yStrings.js | 6 ++++++ js/resistance-in-a-wire/view/ControlPanel.js | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/js/resistance-in-a-wire/ResistanceInAWireA11yStrings.js b/js/resistance-in-a-wire/ResistanceInAWireA11yStrings.js index 1424fe1..603bf8a 100644 --- a/js/resistance-in-a-wire/ResistanceInAWireA11yStrings.js +++ b/js/resistance-in-a-wire/ResistanceInAWireA11yStrings.js @@ -157,6 +157,12 @@ define( function( require ) { }, areaSliderLabelString: { value: 'A, Area' + }, + sliderControlsString: { + value: 'Slider Controls' + }, + slidersDescriptionString: { + value: 'Resistivity, Length, and Area sliders allow changes to equation and wire.' } }; diff --git a/js/resistance-in-a-wire/view/ControlPanel.js b/js/resistance-in-a-wire/view/ControlPanel.js index 26e1d4d..2144ed6 100644 --- a/js/resistance-in-a-wire/view/ControlPanel.js +++ b/js/resistance-in-a-wire/view/ControlPanel.js @@ -42,6 +42,8 @@ define( function( require ) { var resistivitySliderLabelString = ResistanceInAWireA11yStrings.resistivitySliderLabelString.value; var lengthSliderLabelString = ResistanceInAWireA11yStrings.lengthSliderLabelString.value; var areaSliderLabelString = ResistanceInAWireA11yStrings.areaSliderLabelString.value; + var sliderControlsString = ResistanceInAWireA11yStrings.sliderControlsString.value; + var slidersDescriptionString = ResistanceInAWireA11yStrings.slidersDescriptionString.value; // constants var SLIDER_SPACING = 50; @@ -60,7 +62,14 @@ define( function( require ) { lineWidth: 3, resize: false, tandem: tandem, - preventFit: true + preventFit: true, + + // a11y + tagName: 'ul', + labelTagName: 'h3', + accessibleLabel: sliderControlsString, + accessibleDescription: slidersDescriptionString, + prependLabels: true }, options ); // Add the dynamic title that indicates the resistance.