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

fix(audit): mark widget roles as interactive (#9825)

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
Tugrul Ates 2024-01-27 01:41:23 +03:00 committed by GitHub
parent a3df9d83ca
commit e4370e9e9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 28 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Fixes false positive aria role errors on interactive elements

View file

@ -50,11 +50,8 @@ const aria_non_interactive_roles = [
'application', 'application',
'article', 'article',
'banner', 'banner',
'button',
'cell', 'cell',
'checkbox',
'columnheader', 'columnheader',
'combobox',
'complementary', 'complementary',
'contentinfo', 'contentinfo',
'definition', 'definition',
@ -64,55 +61,30 @@ const aria_non_interactive_roles = [
'feed', 'feed',
'figure', 'figure',
'form', 'form',
'grid',
'gridcell',
'group', 'group',
'heading', 'heading',
'img', 'img',
'link',
'list', 'list',
'listbox',
'listitem', 'listitem',
'log', 'log',
'main', 'main',
'marquee', 'marquee',
'math', 'math',
'menu',
'menubar',
'menuitem',
'menuitemcheckbox',
'menuitemradio', 'menuitemradio',
'navigation', 'navigation',
'none', 'none',
'note', 'note',
'option',
'presentation', 'presentation',
'progressbar',
'radio',
'radiogroup',
'region', 'region',
'row', 'row',
'rowgroup', 'rowgroup',
'rowheader', 'rowheader',
'scrollbar',
'search', 'search',
'searchbox',
'separator',
'slider',
'spinbutton',
'status', 'status',
'switch',
'tab',
'tablist',
'tabpanel',
'term', 'term',
'textbox',
'timer', 'timer',
'toolbar', 'toolbar',
'tooltip', 'tooltip',
'tree',
'treegrid',
'treeitem',
]; ];
const a11y_required_content = [ const a11y_required_content = [