@@ -202,10 +202,11 @@ var TabsElement = /*#__PURE__*/function (_HTMLElement2) {
202202
203203 // Create tab button
204204 var tabButton = document . createElement ( 'button' ) ;
205- tabButton . setAttribute ( 'aria-expanded ' , ! ! tab . hasAttribute ( 'active' ) ) ;
205+ tabButton . setAttribute ( 'aria-selected ' , ! ! tab . hasAttribute ( 'active' ) ) ;
206206 tabButton . setAttribute ( 'aria-controls' , tab . id ) ;
207207 tabButton . setAttribute ( 'role' , 'tab' ) ;
208208 tabButton . setAttribute ( 'type' , 'button' ) ;
209+ tabButton . setAttribute ( 'tabindex' , 0 ) ;
209210 tabButton . innerHTML = "" . concat ( tab . getAttribute ( 'name' ) ) ;
210211 _this4 . tabButtonContainer . appendChild ( tabButton ) ;
211212 tabButton . addEventListener ( 'click' , _this4 . activateTab ) ;
@@ -314,7 +315,8 @@ var TabsElement = /*#__PURE__*/function (_HTMLElement2) {
314315 var _this6 = this ;
315316 this . tabs . map ( function ( tabObj ) {
316317 tabObj . accordionButton . removeAttribute ( 'aria-disabled' ) ;
317- tabObj . tabButton . removeAttribute ( 'aria-expanded' ) ;
318+ tabObj . tabButton . setAttribute ( 'aria-selected' , false ) ;
319+ tabObj . tabButton . setAttribute ( 'tabindex' , - 1 ) ;
318320 tabObj . accordionButton . setAttribute ( 'aria-expanded' , false ) ;
319321 if ( tabObj . tab . hasAttribute ( 'active' ) ) {
320322 _this6 . dispatchCustomEvent ( 'joomla.tab.hide' , _this6 . view === 'tabs' ? tabObj . tabButton : tabObj . accordionButton , _this6 . previousActive ) ;
@@ -360,7 +362,7 @@ var TabsElement = /*#__PURE__*/function (_HTMLElement2) {
360362 // Remove current active
361363 this . deactivateTabs ( ) ;
362364 // Set new active
363- currentTrigger . tabButton . setAttribute ( 'aria-expanded ' , true ) ;
365+ currentTrigger . tabButton . setAttribute ( 'aria-selected ' , true ) ;
364366 currentTrigger . accordionButton . setAttribute ( 'aria-expanded' , true ) ;
365367 currentTrigger . accordionButton . setAttribute ( 'aria-disabled' , true ) ;
366368 currentTrigger . tab . setAttribute ( 'active' , '' ) ;
0 commit comments