From adeedb195b7f2b72a30b691bc49b7783aafc2a80 Mon Sep 17 00:00:00 2001 From: Jesse Date: Mon, 11 Jan 2021 18:12:43 -0500 Subject: [PATCH] Use AriaHasPopUpMutator where aria-haspopup is being used, see phetsims/scenery#1094 --- js/moleculesandlight/view/MoleculesAndLightScreenView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/moleculesandlight/view/MoleculesAndLightScreenView.js b/js/moleculesandlight/view/MoleculesAndLightScreenView.js index 65614635..4a62d313 100644 --- a/js/moleculesandlight/view/MoleculesAndLightScreenView.js +++ b/js/moleculesandlight/view/MoleculesAndLightScreenView.js @@ -20,6 +20,7 @@ import PhetFont from '../../../../scenery-phet/js/PhetFont.js'; import TimeControlNode from '../../../../scenery-phet/js/TimeControlNode.js'; import globalKeyStateTracker from '../../../../scenery/js/accessibility/globalKeyStateTracker.js'; import KeyboardUtils from '../../../../scenery/js/accessibility/KeyboardUtils.js'; +import AriaHasPopUpMutator from '../../../../scenery/js/accessibility/pdom/AriaHasPopUpMutator.js'; import Rectangle from '../../../../scenery/js/nodes/Rectangle.js'; import Text from '../../../../scenery/js/nodes/Text.js'; import RectangularPushButton from '../../../../sun/js/buttons/RectangularPushButton.js'; @@ -211,7 +212,7 @@ class MoleculesAndLightScreenView extends ScreenView { } ); // pdom - add an attribute that lets the user know the button opens a menu - showLightSpectrumButton.setAccessibleAttribute( 'aria-haspopup', 'dialog' ); + AriaHasPopUpMutator.mutateNode( showLightSpectrumButton, true ); showLightSpectrumButton.centerTop = ( new Vector2( moleculeControlPanel.centerX, timeControlNode.bottom + 13 ) ); this.pdomPlayAreaNode.addChild( showLightSpectrumButton );