Skip to content

Commit 69d7e32

Browse files
committed
Fix Accessibility: Add focus-visible styles to ActionMenu.Button in VariantMenu component
1 parent faa96d4 commit 69d7e32

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/variant-select.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ const VariantMenu = ({title, latest, current, prerelease, legacy}) => {
5353
Select CLI Version:
5454
</Box>
5555
<ActionMenu anchorRef={anchorRef} open={open} onOpenChange={setOpen}>
56-
<ActionMenu.Button aria-describedby={labelId} sx={{width: ['100%', null, 'auto']}}>
56+
<ActionMenu.Button
57+
aria-describedby={labelId}
58+
sx={{
59+
width: ['100%', null, 'auto'],
60+
'&:focus-visible': {
61+
outline: '2px solid',
62+
outlineColor: '-webkit-focus-ring-color',
63+
},
64+
}}
65+
>
5766
{title}
5867
</ActionMenu.Button>
5968
<StyledOverlay width="auto" onEscape={() => setOpen(false)}>

0 commit comments

Comments
 (0)