Skip to content

Commit

Permalink
fix(accessibility improvement for inputcheckbox): inputCheckbox has f…
Browse files Browse the repository at this point in the history
…ocus border for keyboard nav

fix #690
  • Loading branch information
ehoops-zz committed Nov 29, 2023
1 parent 0314183 commit 26441e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/src/core/InputCheckbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const InputCheckbox = (props: CheckboxProps): JSX.Element => {
caption={caption}
control={
<StyledCheckbox
tabIndex={0}
disabled={disabled}
checkedIcon={
<SvgIcon
Expand Down
10 changes: 10 additions & 0 deletions packages/components/src/core/InputCheckbox/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ export const StyledCheckbox = styled(RawCheckbox)`
}
}
&.MuiCheckbox-root {
&.Mui-focusVisible {
outline: 5px auto Highlight;
outline: 5px auto -webkit-focus-ring-color;
}
border-radius: 2px;
padding: 4px;
margin: 3px;
}
.MuiSvgIcon-root {
height: ${iconSizes?.input.height}px;
width: ${iconSizes?.input.width}px;
Expand Down

0 comments on commit 26441e7

Please sign in to comment.