From 2f6f25868f895426d42f4ccb2c59963a26df3920 Mon Sep 17 00:00:00 2001 From: KiriHoy Date: Fri, 19 Jul 2019 14:08:38 +1000 Subject: [PATCH 1/2] non-active tabs to have aria-selected = false --- src/js/footer/070-tabs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/footer/070-tabs.js b/src/js/footer/070-tabs.js index 46938c448..33470db17 100644 --- a/src/js/footer/070-tabs.js +++ b/src/js/footer/070-tabs.js @@ -10,7 +10,7 @@ AddEvent( tabItems, 'click', function( event, $this ) { for( var i = 0; i < currentTabItems.length; i++ ) { RemoveClass( currentTabItems[ i ], 'tab-item--active' ); - currentTabItems[ i ].removeAttribute( 'aria-selected' ); + currentTabItems[ i ].setAttribute( 'aria-selected', 'false' ); currentTabItems[ i ].setAttribute( 'tabindex', '1' ); } From 7e81f0fc43a99eac52d7349dfad94dbed328ca3f Mon Sep 17 00:00:00 2001 From: sukhrajghuman Date: Fri, 19 Jul 2019 15:23:41 +1000 Subject: [PATCH 2/2] update so that aria selected is false on initial load --- src/js/footer/070-tabs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/footer/070-tabs.js b/src/js/footer/070-tabs.js index 33470db17..d68d6648b 100644 --- a/src/js/footer/070-tabs.js +++ b/src/js/footer/070-tabs.js @@ -40,6 +40,9 @@ var InitialiseTabs = function( tabs ) { if( HasClass( tabs[ i ], 'tab-item--active' ) ){ tabs[ i ].setAttribute( 'aria-selected', 'true' ); } + else { + tabs[ i ].setAttribute( 'aria-selected', 'false' ); + } } };