Skip to content

Commit 4d3752b

Browse files
committed
Compile
1 parent 371ceab commit 4d3752b

12 files changed

Lines changed: 42 additions & 22 deletions

dist/css/joomla-tab.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ joomla-tab button[role=tab] {
3939
appearance: none;
4040
}
4141

42-
joomla-tab button[role=tab][aria-expanded=true] {
42+
joomla-tab button[role=tab][aria-expanded=true],
43+
joomla-tab button[role=tab][aria-selected=true] {
4344
background-color: rgba(0, 0, 0, 0.03);
4445
background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05) 100%);
4546
border-right: 0 none;
@@ -49,7 +50,8 @@ joomla-tab button[role=tab][aria-expanded=true] {
4950
box-shadow: 2px 0 1px -1px rgba(0, 0, 0, 0.08) inset, -2px 0 1px -1px rgba(0, 0, 0, 0.08) inset, 0 1px 0 rgba(0, 0, 0, 0.02) inset;
5051
}
5152

52-
joomla-tab button[aria-expanded=true]::after {
53+
joomla-tab button[aria-expanded=true]::after,
54+
joomla-tab button[aria-selected=true]::after {
5355
position: absolute;
5456
right: 0;
5557
bottom: -1px;

dist/css/joomla-tab.min.css

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-es5.js

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

Comments
 (0)