Skip to content

Commit

Permalink
feat(ARIA): incorporate checkbox, radio, and switch roles into …
Browse files Browse the repository at this point in the history
…their respective control box components
  • Loading branch information
cheton committed Feb 6, 2024
1 parent 39eb74c commit f46c8ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/checkbox/CheckboxControlBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ const CheckboxControlBox = forwardRef((
return (
<Box
aria-hidden={ariaAttr(true)}
role="checkbox"
sx={[sx, ...ensureArray(sxProp)]}
{...styleProps}
{...rest}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/radio/RadioControlBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const RadioControlBox = forwardRef((
return (
<Box
aria-hidden={ariaAttr(true)}
role="radio"
sx={[sx, ...ensureArray(sxProp)]}
{...styleProps}
{...rest}
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/switch/SwitchControlBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const SwitchControlBox = forwardRef((
return (
<Box
aria-hidden={ariaAttr(true)}
role="switch"
sx={[sx, ...ensureArray(sxProp)]}
{...styleProps}
{...rest}
Expand Down

0 comments on commit f46c8ee

Please sign in to comment.