fix: recognize role="listitem" as interactive element (#203)
* fix: recognize role="listitem" as interactive element * fix: DISTINCT_INTERACTIVE_ROLES Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Simon <10131203+gaomeng1900@users.noreply.github.com>
This commit is contained in:
@@ -1218,8 +1218,9 @@ export default (
|
||||
'details',
|
||||
'label',
|
||||
'option',
|
||||
'li',
|
||||
])
|
||||
const INTERACTIVE_ROLES = new Set([
|
||||
const DISTINCT_INTERACTIVE_ROLES = new Set([
|
||||
'button',
|
||||
'link',
|
||||
'menuitem',
|
||||
@@ -1235,6 +1236,9 @@ export default (
|
||||
'searchbox',
|
||||
'textbox',
|
||||
'listbox',
|
||||
'listitem',
|
||||
'treeitem',
|
||||
'row',
|
||||
'option',
|
||||
'scrollbar',
|
||||
])
|
||||
@@ -1311,7 +1315,7 @@ export default (
|
||||
return true
|
||||
}
|
||||
// Check interactive roles
|
||||
if (role && INTERACTIVE_ROLES.has(role)) {
|
||||
if (role && DISTINCT_INTERACTIVE_ROLES.has(role)) {
|
||||
return true
|
||||
}
|
||||
// Check contenteditable
|
||||
|
||||
Reference in New Issue
Block a user