From 2e5a01090136c5851e5b3ec2d5c64862c7bced29 Mon Sep 17 00:00:00 2001 From: patrickhlauke Date: Mon, 17 Jun 2019 23:45:07 +0100 Subject: [PATCH] Add initial tabindex handling for tabs set `tabindex` as well as `aria-selected` on tabs --- js/src/tab.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/tab.js b/js/src/tab.js index b9db64baa..65dc3602b 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -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)