From 4208f0bf745e4392219134e93a950bda3492669a Mon Sep 17 00:00:00 2001 From: zepumph Date: Sun, 8 Apr 2018 10:18:13 -0800 Subject: [PATCH] coulombs law regression test, https://github.com/phetsims/scenery/issues/753 --- js/HomeButton.js | 9 +++++---- js/HomeScreenView.js | 4 ++++ js/NavigationBarScreenButton.js | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/HomeButton.js b/js/HomeButton.js index 90401019..16be2fdf 100644 --- a/js/HomeButton.js +++ b/js/HomeButton.js @@ -41,9 +41,10 @@ define( function( require ) { // a11y, tagName: 'button', - labelContent: homeString, + innerContent: homeString, containerTagName: 'li', - descriptionContent: homeScreenDescriptionString + descriptionContent: homeScreenDescriptionString, + appendDescription: true }, options ); var homeIcon = new FontAwesomeNode( 'home' ); @@ -60,10 +61,10 @@ define( function( require ) { // a11y - When you click on the home button in the nav bar, blur() that button when you go to the home screen. this.addAccessibleInputListener( { - click: function(){ + click: function() { self.blur(); } - }); + } ); // a11y - Pass a shape to the focusHighlight to prevent dilation, then tweak the bottom up just a hair so it // isn't off the screen. diff --git a/js/HomeScreenView.js b/js/HomeScreenView.js index b63c40f1..17a5517b 100644 --- a/js/HomeScreenView.js +++ b/js/HomeScreenView.js @@ -52,6 +52,8 @@ define( function( require ) { ScreenView.call( this, { layoutBounds: LAYOUT_BOUNDS, tandem: tandem, + + // a11y labelContent: homeScreenString } ); @@ -97,10 +99,12 @@ define( function( require ) { // large and small buttons are registered as separate instances. See https://github.com/phetsims/phet-io/issues/99 var largeTandem = tandem.createTandem( screen.screenTandem.tail + 'LargeButton' ); + // a11y var a11yScreenButtonOptions = { tagName: 'button', innerContent: screen.name, descriptionContent: screen.descriptionContent, + appendDescription: true, containerTagName: 'li' }; diff --git a/js/NavigationBarScreenButton.js b/js/NavigationBarScreenButton.js index ccec737f..39125ee2 100644 --- a/js/NavigationBarScreenButton.js +++ b/js/NavigationBarScreenButton.js @@ -72,6 +72,7 @@ define( function( require ) { tagName: 'button', containerTagName: 'li', descriptionContent: screen.descriptionContent, + appendDescription: true, innerContent: StringUtils.fillIn( screenNameStringPatternString, { number: screenIndex + 1 // convert from index to display number } )