fix(theme): announce theme switches when using screen reader. #7667 (#8174)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
mturoci 2022-10-05 18:49:01 +02:00 committed by GitHub
parent 982187977d
commit 44af538153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,8 @@ function ColorModeToggle({className, value, onChange}: Props): JSX.Element {
onClick={() => onChange(value === 'dark' ? 'light' : 'dark')}
disabled={!isBrowser}
title={title}
aria-label={title}>
aria-label={title}
aria-live="polite">
<IconLightMode
className={clsx(styles.toggleIcon, styles.lightToggleIcon)}
/>