Skip to content

Commit 651e249

Browse files
author
Leshe4ka
committed
custom aria-label for color picker
1 parent 1208a71 commit 651e249

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

frontend/src/components/Nav/Menu/MenuColorPicker/MenuColorPicker.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ const MenuColorPicker = ({ setColorKey }: MenuColorPickerProps) => {
2828
};
2929

3030
return (
31-
<Dropdown offsetY={5} label={<ColorPickerIcon />}>
31+
<Dropdown
32+
aria-label="Color Picker Dropdown"
33+
offsetY={5}
34+
label={<ColorPickerIcon />}
35+
>
3236
<S.Container>
3337
{COLOR_KEYS.map((key) => (
3438
<S.ColorCircle

frontend/src/components/common/Dropdown/Dropdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const Dropdown: React.FC<DropdownProps> = ({
1515
disabled,
1616
children,
1717
offsetY,
18+
...props
1819
}) => {
1920
const ref = useRef(null);
2021
const { value: isOpen, setFalse, setTrue } = useBoolean(false);
@@ -30,7 +31,7 @@ const Dropdown: React.FC<DropdownProps> = ({
3031
<S.DropdownButton
3132
onClick={handleClick}
3233
ref={ref}
33-
aria-label="Dropdown Toggle"
34+
aria-label={props['aria-label'] || 'Dropdown Toggle'}
3435
disabled={disabled}
3536
>
3637
{label || <VerticalElipsisIcon />}

0 commit comments

Comments
 (0)