Skip to content

Commit

Permalink
Keyboard a11y improvements focus visible (#1275)
Browse files Browse the repository at this point in the history
* use type=button for PopoverButton

* use :focus-visible instead of :focus
  • Loading branch information
dmfalke authored Nov 15, 2024
1 parent cdbf6f3 commit 95c2e15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ const PopoverButton = forwardRef<PopoverButtonHandle, PopoverButtonProps>(
additionalAriaProperties={{
'aria-controls': 'dropdown',
'aria-haspopup': 'true',
type: 'button',
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function UIThemeProvider({
<ThemeProvider theme={theme}>
<Global
styles={css`
*:focus {
*:focus-visible {
outline: 2px solid
${theme.palette.primary.hue[theme.palette.primary.level]};
}
Expand Down

0 comments on commit 95c2e15

Please sign in to comment.