Skip to content

Commit

Permalink
🐛 fix(segment-control): accessiblity fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
creador-dev committed Apr 18, 2024
1 parent cbdea09 commit b017a36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ui/segmented-control/src/segmented-control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const SegmentedControl: React.FC<SegmentedControlProps> = ({
onChange = () => {},
children,
isFullWidth = false,
ariaAttrs = {},
_htmlProps,
_style = {},
}) => {
Expand Down Expand Up @@ -69,8 +70,10 @@ const SegmentedControl: React.FC<SegmentedControlProps> = ({
>
{/* Render the segmented control with the provided children inside a div with appropriate class names. */}
<div
role="radiogroup"
className={classNames}
data-testid="segmented-control"
{...ariaAttrs}
{..._renderHTMLPropsSafely(_htmlProps)}
>
{children}
Expand Down

0 comments on commit b017a36

Please sign in to comment.