@@ -206,8 +206,11 @@ var TabsElement = /*#__PURE__*/function (_HTMLElement2) {
206206 tabButton . setAttribute ( 'aria-controls' , tab . id ) ;
207207 tabButton . setAttribute ( 'role' , 'tab' ) ;
208208 tabButton . setAttribute ( 'type' , 'button' ) ;
209- tabButton . setAttribute ( 'tabindex' , 0 ) ;
209+ tabButton . setAttribute ( 'tabindex' , - 1 ) ;
210210 tabButton . innerHTML = "" . concat ( tab . getAttribute ( 'name' ) ) ;
211+ if ( tab . hasAttribute ( 'active' ) ) {
212+ tabButton . setAttribute ( 'tabindex' , 0 ) ;
213+ }
211214 _this4 . tabButtonContainer . appendChild ( tabButton ) ;
212215 tabButton . addEventListener ( 'click' , _this4 . activateTab ) ;
213216 if ( _this4 . view === 'tabs' ) {
@@ -386,7 +389,7 @@ var TabsElement = /*#__PURE__*/function (_HTMLElement2) {
386389 value : function createNavs ( tab ) {
387390 if ( tab instanceof Element && tab . tagName . toLowerCase ( ) !== 'joomla-tab-element' || ! [ ] . some . call ( this . children , function ( el ) {
388391 return el === tab ;
389- } ) . length || ! tab . getAttribute ( 'name' ) || ! tab . getAttribute ( 'id' ) ) return ;
392+ } ) || ! tab . getAttribute ( 'name' ) || ! tab . getAttribute ( 'id' ) ) return ;
390393 var tabs = [ ] . slice . call ( this . children ) . filter ( function ( el ) {
391394 return el . tagName . toLowerCase ( ) === 'joomla-tab-element' ;
392395 } ) ;
@@ -447,7 +450,7 @@ var TabsElement = /*#__PURE__*/function (_HTMLElement2) {
447450 value : function removeNavs ( tab ) {
448451 if ( tab instanceof Element && tab . tagName . toLowerCase ( ) !== 'joomla-tab-element' || ! [ ] . some . call ( this . children , function ( el ) {
449452 return el === tab ;
450- } ) . length || ! tab . getAttribute ( 'name' ) || ! tab . getAttribute ( 'id' ) ) return ;
453+ } ) || ! tab . getAttribute ( 'name' ) || ! tab . getAttribute ( 'id' ) ) return ;
451454 var accordionButton = tab . previousSilbingElement ;
452455 if ( accordionButton && accordionButton . tagName . toLowerCase ( ) === 'button' ) {
453456 accordionButton . removeEventListener ( 'click' , this . keyBehaviour ) ;
0 commit comments