Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions lib/web/mage/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,16 @@ define([

/**
* When the widget gets instantiated, the first tab that is not disabled receive focusable property
* Updated: for accessibility all tabs receive tabIndex 0
* All tabs receive tabIndex 0
* @private
*/
_processTabIndex: function () {
var self = this;

self.triggers.attr('tabIndex', 0);
$.each(this.collapsibles, function (i) {
if (!$(this).collapsible('option', 'disabled')) {
self.triggers.eq(i).attr('tabIndex', 0);

return false;
}
});
$.each(this.collapsibles, function (i) {
$(this).on('beforeOpen', function () {
self.triggers.attr('tabIndex', 0);
self.triggers.eq(i).attr('tabIndex', 0);
});
self.triggers.attr('tabIndex', 0);
self.triggers.eq(i).attr('tabIndex', 0);
});
},

Expand Down