Skip to content

Commit 772b69a

Browse files
committed
Recompile
1 parent abc4d2e commit 772b69a

File tree

8 files changed

+24
-16
lines changed

8 files changed

+24
-16
lines changed

dist/js/joomla-tab-es5.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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', '');

dist/js/joomla-tab-es5.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/joomla-tab.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ class TabsElement extends HTMLElement {
144144

145145
// Create tab button
146146
const tabButton = document.createElement('button');
147-
tabButton.setAttribute('aria-expanded', !!tab.hasAttribute('active'));
147+
tabButton.setAttribute('aria-selected', !!tab.hasAttribute('active'));
148148
tabButton.setAttribute('aria-controls', tab.id);
149149
tabButton.setAttribute('role', 'tab');
150150
tabButton.setAttribute('type', 'button');
151+
tabButton.setAttribute('tabindex', 0);
151152
tabButton.innerHTML = `${tab.getAttribute('name')}`;
152153
this.tabButtonContainer.appendChild(tabButton);
153154

@@ -240,7 +241,8 @@ class TabsElement extends HTMLElement {
240241
deactivateTabs() {
241242
this.tabs.map((tabObj) => {
242243
tabObj.accordionButton.removeAttribute('aria-disabled');
243-
tabObj.tabButton.removeAttribute('aria-expanded');
244+
tabObj.tabButton.setAttribute('aria-selected', false);
245+
tabObj.tabButton.setAttribute('tabindex', -1);
244246
tabObj.accordionButton.setAttribute('aria-expanded', false);
245247

246248
if (tabObj.tab.hasAttribute('active')) {
@@ -279,7 +281,7 @@ class TabsElement extends HTMLElement {
279281
// Remove current active
280282
this.deactivateTabs();
281283
// Set new active
282-
currentTrigger.tabButton.setAttribute('aria-expanded', true);
284+
currentTrigger.tabButton.setAttribute('aria-selected', true);
283285
currentTrigger.accordionButton.setAttribute('aria-expanded', true);
284286
currentTrigger.accordionButton.setAttribute('aria-disabled', true);
285287
currentTrigger.tab.setAttribute('active', '');

dist/js/joomla-tab.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_media/js/joomla-tab-es5.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)