Skip to content

Commit

Permalink
rename accessibleDescription --> descriptionContent, remove descripti…
Browse files Browse the repository at this point in the history
…on 'AsHTML' method, phetsims/scenery#752
  • Loading branch information
zepumph authored and jessegreenberg committed Apr 21, 2021
1 parent 253df3d commit c192a4b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions js/moleculesandlight/view/MoleculeSelectionPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,56 +135,56 @@ define( function( require ) {
value: PhotonTarget.SINGLE_CO_MOLECULE,
tandemName: 'singleCOMoleculeRadioButton',
labelContent: controlPanelCarbonMonoxideString,
accessibleDescription: carbonMonoxideDescriptionString
descriptionContent: carbonMonoxideDescriptionString
},
{
node: createRadioButtonContent( controlPanelNitrogenString, N2_FORMULA_STRING, new MoleculeNode( new N2(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_N2_MOLECULE,
tandemName: 'singleN2MoleculeRadioButton',
labelContent: controlPanelNitrogenString,
accessibleDescription: nitrogenDescriptionString
descriptionContent: nitrogenDescriptionString
},
{
node: createRadioButtonContent( controlPanelOxygenString, O2_FORMULA_STRING, new MoleculeNode( new O2(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_O2_MOLECULE,
tandemName: 'singleO2MoleculeRadioButton',
labelContent: controlPanelOxygenString,
accessibleDescription: oxygenDescriptionString
descriptionContent: oxygenDescriptionString
},
{
node: createRadioButtonContent( controlPanelCarbonDioxideString, CO2_FORMULA_STRING, new MoleculeNode( new CO2(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_CO2_MOLECULE,
tandemName: 'singleCO2MoleculeRadioButton',
labelContent: controlPanelCarbonDioxideString,
accessibleDescription: carbonDioxideDescriptionString
descriptionContent: carbonDioxideDescriptionString
},
{
node: createRadioButtonContent( controlPanelMethaneString, CH4_FORMULA_STRING, new MoleculeNode( new CH4(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_CH4_MOLECULE,
tandemName: 'singleCH4MoleculeRadioButton',
labelContent: controlPanelMethaneString,
accessibleDescription: methaneDescriptionString
descriptionContent: methaneDescriptionString
},
{
node: createRadioButtonContent( controlPanelWaterString, H20_FORMULA_STRING, new MoleculeNode( new H2O(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_H2O_MOLECULE,
tandemName: 'singleH2OMoleculeRadioButton',
labelContent: controlPanelWaterString,
accessibleDescription: waterDescriptionString
descriptionContent: waterDescriptionString
},
{
node: createRadioButtonContent( controlPanelNitrogenDioxideString, NO2_FORMULA_STRING, new MoleculeNode( new NO2(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_NO2_MOLECULE,
tandemName: 'singleNO2MoleculeRadioButton',
labelContent: controlPanelNitrogenDioxideString,
accessibleDescription: nitrogenDioxideDescriptionString
descriptionContent: nitrogenDioxideDescriptionString
},
{
node: createRadioButtonContent( controlPanelOzoneString, O3_FORMULA_STRING, new MoleculeNode( new O3(), MODEL_VIEW_TRANSFORM ) ),
value: PhotonTarget.SINGLE_O3_MOLECULE,
tandemName: 'singleO3MoleculeRadioButton',
labelContent: controlPanelOzoneString,
accessibleDescription: ozoneDescriptionString
descriptionContent: ozoneDescriptionString
}
];

Expand Down Expand Up @@ -225,7 +225,7 @@ define( function( require ) {
tagName: 'div',
labelTagName: 'h3',
labelContent: moleculesString,
accessibleDescription: moleculesPanelDescriptionString,
descriptionContent: moleculesPanelDescriptionString,
prependLabels: true
} );
}
Expand Down
6 changes: 3 additions & 3 deletions js/moleculesandlight/view/MoleculesAndLightScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ define( function( require ) {

var summaryNode = new AccessibleSectionNode( 'Scene Summary', {
descriptionTagName: 'p',
accessibleDescription: sceneSummaryString
descriptionContent: sceneSummaryString
} );

// interaction hint and keyboard shortcuts
Expand Down Expand Up @@ -169,7 +169,7 @@ define( function( require ) {

// a11y
innerContent: stepButtonLabelString,
accessibleDescription: stepButtonDescriptionString
descriptionContent: stepButtonDescriptionString
} );
controlPanelSectionNode.addChild( stepButton );

Expand Down Expand Up @@ -209,7 +209,7 @@ define( function( require ) {

// a11y
innerContent: spectrumButtonLabelString,
accessibleDescription: spectrumButtonDescriptionString,
descriptionContent: spectrumButtonDescriptionString,
containerTagName: 'div'
} );

Expand Down
4 changes: 2 additions & 2 deletions js/moleculesandlight/view/ObservationWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ define( function( require ) {
// a11y
tagName: 'input',
inputType: 'button',
accessibleDescription: returnMoleculeHelpString,
descriptionContent: returnMoleculeHelpString,
ariaLabel: returnMoleculeString
} );

Expand Down Expand Up @@ -298,7 +298,7 @@ define( function( require ) {
var onOfString = emissionFrequency > 0 ? emitsPhotonsString : isOffAndPointsString;
var aOrAn = 'AEIOU'.search( moleculeString.charAt( 1 ) ) === -1 ? aString : anString;

this.accessibleDescription = StringUtils.fillIn( observationWindowDescriptionPatternString, {
this.descriptionContent = StringUtils.fillIn( observationWindowDescriptionPatternString, {
wavelengthName: lightSourceString,
molecule: moleculeString,
lightOnOffLanguage: onOfString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ define( function( require ) {
tagName: 'div',
labelTagName: 'h3',
labelContent: lightSourceString,
accessibleDescription: lightSourceDescriptionString,
descriptionContent: lightSourceDescriptionString,
prependLabels: true
} );

Expand Down
2 changes: 1 addition & 1 deletion js/moleculesandlight/view/SpectrumWindowDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define( function( require ) {

// a11y
tagName: 'p',
accessibleDescription: spectrumWindowDescriptionString,
descriptionContent: spectrumWindowDescriptionString,
prependLabels: true
} );

Expand Down

0 comments on commit c192a4b

Please sign in to comment.