Skip to content

Commit 891e357

Browse files
committed
adds more context to a11y issues with the tooltip implementation
1 parent b3d1e82 commit 891e357

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SegmentedControl/SegmentedControlIconButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const SegmentedControlIconButtonStyled = styled.button`
2525
// TODO: update this component to be accessible when we update the Tooltip component
2626
// - we wouldn't render tooltip content inside a pseudoelement
2727
// - users can pass custom tooltip text in addition to `ariaLabel`
28+
//
29+
// See Slack thread: https://github.slack.com/archives/C02NUUQ9C30/p1656444474509599
30+
//
2831
export const SegmentedControlIconButton: React.FC<SegmentedControlIconButtonProps> = ({
2932
'aria-label': ariaLabel,
3033
icon: Icon,
@@ -46,7 +49,7 @@ export const SegmentedControlIconButton: React.FC<SegmentedControlIconButtonProp
4649
':not(:last-child) button': borderedSegment
4750
}}
4851
>
49-
<SegmentedControlIconButtonStyled aria-pressed={selected} sx={mergedSx} {...rest}>
52+
<SegmentedControlIconButtonStyled aria-label={ariaLabel} aria-pressed={selected} sx={mergedSx} {...rest}>
5053
<span className="segmentedControl-content">
5154
<Icon />
5255
</span>

0 commit comments

Comments
 (0)