Add initial tabindex handling for tabs
set `tabindex` as well as `aria-selected` on tabs
This commit is contained in:
parent
08bddb8743
commit
2e5a010901
1 changed files with 2 additions and 0 deletions
|
|
@ -183,12 +183,14 @@ class Tab {
|
|||
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
active.setAttribute('aria-selected', false)
|
||||
active.setAttribute('tabindex', '-1')
|
||||
}
|
||||
}
|
||||
|
||||
element.classList.add(ClassName.ACTIVE)
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true)
|
||||
element.setAttribute('tabindex', '0')
|
||||
}
|
||||
|
||||
reflow(element)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue