0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

Update a11y-no-noninteractive-tabindex rule for dev tool bar (#10750)

* fix: a11y-no-noninteractive-tabindex

* add changeset
This commit is contained in:
Oliver Speir 2024-04-11 02:03:56 -06:00 committed by GitHub
parent e8683d90f3
commit 7e825604dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Fixes a false positive for "Invalid `tabindex` on non-interactive element" rule for roleless elements ( `div` and `span` ).

View file

@ -513,7 +513,11 @@ export const a11y: AuditRuleWithSelector[] = [
if (!isInteractive(element)) return false;
if (!interactiveElements.includes(element.localName)) return true;
if (
!interactiveElements.includes(element.localName) &&
!roleless_elements.includes(element.localName)
)
return true;
},
},
{