diff options
author | 2024-01-27 01:41:23 +0300 | |
---|---|---|
committer | 2024-01-26 16:41:23 -0600 | |
commit | e4370e9e9dd862425eced25823c82e77d9516927 (patch) | |
tree | 600f415e419249e11bb170b96165b49268a03242 | |
parent | a3df9d83ca92abb5f08f576631019c1604204bd9 (diff) | |
download | astro-e4370e9e9dd862425eced25823c82e77d9516927.tar.gz astro-e4370e9e9dd862425eced25823c82e77d9516927.tar.zst astro-e4370e9e9dd862425eced25823c82e77d9516927.zip |
fix(audit): mark widget roles as interactive (#9825)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
-rw-r--r-- | .changeset/old-actors-taste.md | 5 | ||||
-rw-r--r-- | packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts | 28 |
2 files changed, 5 insertions, 28 deletions
diff --git a/.changeset/old-actors-taste.md b/.changeset/old-actors-taste.md new file mode 100644 index 000000000..f11550a8c --- /dev/null +++ b/.changeset/old-actors-taste.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes false positive aria role errors on interactive elements diff --git a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts index 6eb4cd97b..ac1624cd9 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts @@ -50,11 +50,8 @@ const aria_non_interactive_roles = [ 'application', 'article', 'banner', - 'button', 'cell', - 'checkbox', 'columnheader', - 'combobox', 'complementary', 'contentinfo', 'definition', @@ -64,55 +61,30 @@ const aria_non_interactive_roles = [ 'feed', 'figure', 'form', - 'grid', - 'gridcell', 'group', 'heading', 'img', - 'link', 'list', - 'listbox', 'listitem', 'log', 'main', 'marquee', 'math', - 'menu', - 'menubar', - 'menuitem', - 'menuitemcheckbox', 'menuitemradio', 'navigation', 'none', 'note', - 'option', 'presentation', - 'progressbar', - 'radio', - 'radiogroup', 'region', 'row', 'rowgroup', 'rowheader', - 'scrollbar', 'search', - 'searchbox', - 'separator', - 'slider', - 'spinbutton', 'status', - 'switch', - 'tab', - 'tablist', - 'tabpanel', 'term', - 'textbox', 'timer', 'toolbar', 'tooltip', - 'tree', - 'treegrid', - 'treeitem', ]; const a11y_required_content = [ |