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:
parent
e8683d90f3
commit
7e825604dd
2 changed files with 10 additions and 1 deletions
5
.changeset/few-mails-kiss.md
Normal file
5
.changeset/few-mails-kiss.md
Normal 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` ).
|
|
@ -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;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue