Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit 6866b96

Browse files
committed
Fix tabindex='-1' elements being tabbable
1 parent 6e51fb9 commit 6866b96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ function keydown(event: KeyboardEvent): void {
3333

3434
function focusable(el: Focusable): boolean {
3535
return (
36-
(el.hasAttribute('tabindex') || el.tabIndex >= 0) &&
37-
(!el.disabled && !el.hidden && (!el.type || el.type !== 'hidden') && !el.closest('[hidden]'))
36+
el.tabIndex >= 0 && (!el.disabled && !el.hidden && (!el.type || el.type !== 'hidden') && !el.closest('[hidden]'))
3837
)
3938
}
4039

0 commit comments

Comments
 (0)