Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #630 from govau/develop
Browse files Browse the repository at this point in the history
aria-selected must be set to false on the unselected tabs -> master
  • Loading branch information
KiriHoy authored Jul 21, 2019
2 parents 2f23340 + 7e81f0f commit 1d674d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/footer/070-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

Expand Down Expand Up @@ -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' );
}
}
};

Expand Down

0 comments on commit 1d674d8

Please sign in to comment.