Skip to content

Commit ec199d0

Browse files
authored
fix(ui): add default aria-label to toggle (#9024)
* fix(ui): add default aria-label to toggle Signed-off-by: Aviv Keller <me@aviv.sh> * Add default aria-label to ThemeToggle Add a default aria-label to the ThemeToggle component. Signed-off-by: Aviv Keller <me@aviv.sh> * fixup! Signed-off-by: Aviv Keller <me@aviv.sh> --------- Signed-off-by: Aviv Keller <me@aviv.sh>
1 parent e573e7c commit ec199d0

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎.changeset/theme-toggle-aria.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@node-core/ui-components': patch
3+
---
4+
5+
Add a default `aria-label` to `ThemeToggle`.

‎packages/ui-components/src/Common/ThemeToggle/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const themes: Array<Theme> = ['system', 'light', 'dark'];
3030
const ThemeToggle: FC<ThemeToggleProps> = ({
3131
onChange = () => {},
3232
currentTheme = 'system',
33-
ariaLabel,
33+
ariaLabel = 'Select theme',
3434
themeLabels = { system: 'System', light: 'Light', dark: 'Dark' },
3535
}) => {
3636
const TriggerIcon = themeIcons[currentTheme];

0 commit comments

Comments
 (0)