Skip to content

Commit

Permalink
Update a11y-no-noninteractive-tabindex rule for dev tool bar (#10750)
Browse files Browse the repository at this point in the history
* fix: a11y-no-noninteractive-tabindex

* add changeset
  • Loading branch information
OliverSpeir committed Apr 11, 2024
1 parent e8683d9 commit 7e82560
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/few-mails-kiss.md
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes a false positive for "Invalid `tabindex` on non-interactive element" rule for roleless elements ( `div` and `span` ).
Expand Up @@ -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;
},
},
{
Expand Down

0 comments on commit 7e82560

Please sign in to comment.