From 51f307d9038ab3c042d784352cb1b953a9a13197 Mon Sep 17 00:00:00 2001 From: zepumph Date: Sun, 8 Apr 2018 10:44:18 -0800 Subject: [PATCH] molecules-and-light regression, https://github.com/phetsims/scenery/issues/753 --- js/moleculesandlight/view/MoleculeSelectionPanel.js | 3 +-- .../view/MoleculesAndLightScreenView.js | 4 +++- js/moleculesandlight/view/ObservationWindow.js | 10 ++++------ .../view/QuadEmissionFrequencyControlPanel.js | 3 +-- js/moleculesandlight/view/SpectrumWindowDialog.js | 3 +-- .../view/EmissionRateControlSliderNode.js | 1 - 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/js/moleculesandlight/view/MoleculeSelectionPanel.js b/js/moleculesandlight/view/MoleculeSelectionPanel.js index cb587701..0600bfdf 100644 --- a/js/moleculesandlight/view/MoleculeSelectionPanel.js +++ b/js/moleculesandlight/view/MoleculeSelectionPanel.js @@ -225,8 +225,7 @@ define( function( require ) { tagName: 'div', labelTagName: 'h3', labelContent: moleculesString, - descriptionContent: moleculesPanelDescriptionString, - prependLabels: true + descriptionContent: moleculesPanelDescriptionString } ); } diff --git a/js/moleculesandlight/view/MoleculesAndLightScreenView.js b/js/moleculesandlight/view/MoleculesAndLightScreenView.js index 43968044..509aa79f 100644 --- a/js/moleculesandlight/view/MoleculesAndLightScreenView.js +++ b/js/moleculesandlight/view/MoleculesAndLightScreenView.js @@ -169,7 +169,8 @@ define( function( require ) { // a11y innerContent: stepButtonLabelString, - descriptionContent: stepButtonDescriptionString + descriptionContent: stepButtonDescriptionString, + appendDescription: true } ); controlPanelSectionNode.addChild( stepButton ); @@ -210,6 +211,7 @@ define( function( require ) { // a11y innerContent: spectrumButtonLabelString, descriptionContent: spectrumButtonDescriptionString, + appendDescription: true, containerTagName: 'div' } ); diff --git a/js/moleculesandlight/view/ObservationWindow.js b/js/moleculesandlight/view/ObservationWindow.js index fb925db8..868cd0e7 100644 --- a/js/moleculesandlight/view/ObservationWindow.js +++ b/js/moleculesandlight/view/ObservationWindow.js @@ -27,7 +27,7 @@ define( function( require ) { var StringUtils = require( 'PHETCOMMON/util/StringUtils' ); var Text = require( 'SCENERY/nodes/Text' ); var PhotonTarget = require( 'MOLECULES_AND_LIGHT/photon-absorption/model/PhotonTarget' ); - var WavelengthConstants = require( 'MOLECULES_AND_LIGHT/photon-absorption/model/WavelengthConstants'); + var WavelengthConstants = require( 'MOLECULES_AND_LIGHT/photon-absorption/model/WavelengthConstants' ); var Vector2 = require( 'DOT/Vector2' ); // phet-io modules @@ -88,8 +88,7 @@ define( function( require ) { // a11y tagName: 'div', labelTagName: 'h3', - labelContent: 'Observation Window', - prependLabels: true + labelContent: 'Observation Window' } ); var self = this; @@ -161,7 +160,7 @@ define( function( require ) { // move focus to the emission control slider only when the button is clicked // retain focus on other elements if button was clicked without focus self.returnMoleculeButtonNode.isFocused() && photonEmitterNode.emissionRateControlSliderNode.emissionRateControlSlider.focus(); - + photonAbsorptionModel.restoreActiveMolecule(); self.returnMoleculeButtonVisibleProperty.set( false ); self.moleculeCheckBounds(); @@ -169,9 +168,8 @@ define( function( require ) { tandem: tandem.createTandem( 'returnMoleculeButton' ), // a11y - tagName: 'input', - inputType: 'button', descriptionContent: returnMoleculeHelpString, + appendDescription: true, ariaLabel: returnMoleculeString } ); diff --git a/js/moleculesandlight/view/QuadEmissionFrequencyControlPanel.js b/js/moleculesandlight/view/QuadEmissionFrequencyControlPanel.js index 0cdb467e..70eff51f 100644 --- a/js/moleculesandlight/view/QuadEmissionFrequencyControlPanel.js +++ b/js/moleculesandlight/view/QuadEmissionFrequencyControlPanel.js @@ -72,8 +72,7 @@ define( function( require ) { tagName: 'div', labelTagName: 'h3', labelContent: lightSourceString, - descriptionContent: lightSourceDescriptionString, - prependLabels: true + descriptionContent: lightSourceDescriptionString } ); // Initialize the photon nodes for the control panel. Identity model view transform is used because these photon diff --git a/js/moleculesandlight/view/SpectrumWindowDialog.js b/js/moleculesandlight/view/SpectrumWindowDialog.js index 83e1b8fd..c6728922 100644 --- a/js/moleculesandlight/view/SpectrumWindowDialog.js +++ b/js/moleculesandlight/view/SpectrumWindowDialog.js @@ -62,8 +62,7 @@ define( function( require ) { // a11y tagName: 'p', - descriptionContent: spectrumWindowDescriptionString, - prependLabels: true + descriptionContent: spectrumWindowDescriptionString } ); // close it on a click diff --git a/js/photon-absorption/view/EmissionRateControlSliderNode.js b/js/photon-absorption/view/EmissionRateControlSliderNode.js index f9c9a66f..c3228893 100644 --- a/js/photon-absorption/view/EmissionRateControlSliderNode.js +++ b/js/photon-absorption/view/EmissionRateControlSliderNode.js @@ -71,7 +71,6 @@ define( function( require ) { labelTagName: 'label', labelContent: lightSourceSliderString, descriptionContent: emissionSliderDescriptionString, - prependLabels: true, numberDecimalPlaces: 1, keyboardStep: sliderRange.getLength() / 10, shiftKeyboardStep: sliderRange.getLength() / 20,