Skip to content

Commit 38c1c33

Browse files
author
Daniel Ruf
committed
fix: remove old code in tabs, always set tabindex to 0 when tabs are initialized
1 parent 1a805d0 commit 38c1c33

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

lib/web/mage/tabs.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,16 @@ define([
8383

8484
/**
8585
* When the widget gets instantiated, the first tab that is not disabled receive focusable property
86-
* Updated: for accessibility all tabs receive tabIndex 0
86+
* All tabs receive tabIndex 0
8787
* @private
8888
*/
8989
_processTabIndex: function () {
9090
var self = this;
9191

9292
self.triggers.attr('tabIndex', 0);
9393
$.each(this.collapsibles, function (i) {
94-
if (!$(this).collapsible('option', 'disabled')) {
95-
self.triggers.eq(i).attr('tabIndex', 0);
96-
97-
return false;
98-
}
99-
});
100-
$.each(this.collapsibles, function (i) {
101-
$(this).on('beforeOpen', function () {
102-
self.triggers.attr('tabIndex', 0);
103-
self.triggers.eq(i).attr('tabIndex', 0);
104-
});
94+
self.triggers.attr('tabIndex', 0);
95+
self.triggers.eq(i).attr('tabIndex', 0);
10596
});
10697
},
10798

0 commit comments

Comments
 (0)