Compare commits

...

5 Commits

Author SHA1 Message Date
Patrick H. Lauke 890d35096b Merge branch 'main' into main-lmp-tab-fix 2023-03-06 08:10:16 +00:00
louismaxime.piton 69547eb524 fix(review) 2023-03-06 08:57:42 +01:00
Patrick H. Lauke 97e41225d7 Merge branch 'main' into main-lmp-tab-fix 2023-03-03 15:23:07 +00:00
louismaxime.piton 97b56188ad . 2023-03-03 14:01:55 +01:00
louismaxime.piton b8ef1f7c71 Fix ? 2023-03-02 09:36:00 +01:00
+4 -2
View File
@@ -109,12 +109,13 @@ class Tab extends BaseComponent {
this._activate(SelectorEngine.getElementFromSelector(element)) // Search and activate/show the proper section
const complete = () => {
element.removeAttribute('tabindex')
if (element.getAttribute('role') !== 'tab') {
element.classList.add(CLASS_NAME_SHOW)
return
}
element.removeAttribute('tabindex')
element.setAttribute('aria-selected', true)
this._toggleDropDown(element, true)
EventHandler.trigger(element, EVENT_SHOWN, {
@@ -136,13 +137,14 @@ class Tab extends BaseComponent {
this._deactivate(SelectorEngine.getElementFromSelector(element)) // Search and deactivate the shown section too
const complete = () => {
element.setAttribute('tabindex', '-1')
if (element.getAttribute('role') !== 'tab') {
element.classList.remove(CLASS_NAME_SHOW)
return
}
element.setAttribute('aria-selected', false)
element.setAttribute('tabindex', '-1')
this._toggleDropDown(element, false)
EventHandler.trigger(element, EVENT_HIDDEN, { relatedTarget: relatedElem })
}