Skip to content

Commit

Permalink
fix(ui-color-picker): add hex to aria-label
Browse files Browse the repository at this point in the history
INSTUI-4273
  • Loading branch information
joyenjoyer committed Feb 4, 2025
1 parent 359b73c commit 7518383
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui-color-picker/src/ColorPreset/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ class ColorPreset extends Component<ColorPresetProps, ColorPresetState> {
cursor={this.props.disabled ? 'not-allowed' : 'auto'}
as="button"
{...(selectOnClick ? { onClick: () => this.props.onSelect(color) } : {})}
{...(this.isSelectedColor(color) ? { 'aria-label': 'selected' } : {})}
{...(this.isSelectedColor(color)
? { 'aria-label': color + ' selected' }
: { 'aria-label': color })}
>
<div>
<ColorIndicator color={color} shape="rectangle" role="presentation" />
Expand Down

0 comments on commit 7518383

Please sign in to comment.