Skip to content

Commit e3588f9

Browse files
authored
A11y: update roles for picker menus (#55885)
1 parent 0c69d86 commit e3588f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/components/Fields.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const Fields = (fieldProps: {
1616
const { open, setOpen, items, onSelect, renderItem } = fieldProps
1717

1818
return (
19-
<ActionList selectionVariant="single">
19+
<ActionList selectionVariant="single" role="menu">
2020
{items.map((item, i) =>
2121
item.divider ? (
2222
<ActionList.Divider key={`divider${i}`} />
@@ -42,6 +42,7 @@ export const Fields = (fieldProps: {
4242
textAlign: 'left',
4343
},
4444
}}
45+
role={item.extra?.arrow || item.extra?.info ? 'menuitem' : 'menuitemradio'}
4546
>
4647
{renderItem ? renderItem(item) : item.text}
4748
</ActionList.Item>

0 commit comments

Comments
 (0)