mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(web): announce current theme to screen reader users (#12039)
This commit is contained in:
parent
b2dd5a3152
commit
96056208fc
2 changed files with 10 additions and 2 deletions
|
@ -7,8 +7,16 @@
|
||||||
|
|
||||||
$: icon = $colorTheme.value === Theme.LIGHT ? moonPath : sunPath;
|
$: icon = $colorTheme.value === Theme.LIGHT ? moonPath : sunPath;
|
||||||
$: viewBox = $colorTheme.value === Theme.LIGHT ? moonViewBox : sunViewBox;
|
$: viewBox = $colorTheme.value === Theme.LIGHT ? moonViewBox : sunViewBox;
|
||||||
|
$: isDark = $colorTheme.value === Theme.DARK;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !$colorTheme.system}
|
{#if !$colorTheme.system}
|
||||||
<CircleIconButton title={$t('toggle_theme')} {icon} {viewBox} on:click={handleToggleTheme} />
|
<CircleIconButton
|
||||||
|
title={$t('toggle_theme')}
|
||||||
|
{icon}
|
||||||
|
{viewBox}
|
||||||
|
role="switch"
|
||||||
|
aria-checked={isDark ? 'true' : 'false'}
|
||||||
|
on:click={handleToggleTheme}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1171,7 +1171,7 @@
|
||||||
"to_login": "Login",
|
"to_login": "Login",
|
||||||
"to_trash": "Trash",
|
"to_trash": "Trash",
|
||||||
"toggle_settings": "Toggle settings",
|
"toggle_settings": "Toggle settings",
|
||||||
"toggle_theme": "Toggle theme",
|
"toggle_theme": "Toggle dark theme",
|
||||||
"total_usage": "Total usage",
|
"total_usage": "Total usage",
|
||||||
"trash": "Trash",
|
"trash": "Trash",
|
||||||
"trash_all": "Trash All",
|
"trash_all": "Trash All",
|
||||||
|
|
Loading…
Reference in a new issue