mirror of
https://github.com/immich-app/immich.git
synced 2024-12-27 10:58:13 +02:00
fix(web): announce current theme to screen reader users (#12039)
This commit is contained in:
parent
b2dd5a3152
commit
96056208fc
@ -7,8 +7,16 @@
|
||||
|
||||
$: icon = $colorTheme.value === Theme.LIGHT ? moonPath : sunPath;
|
||||
$: viewBox = $colorTheme.value === Theme.LIGHT ? moonViewBox : sunViewBox;
|
||||
$: isDark = $colorTheme.value === Theme.DARK;
|
||||
</script>
|
||||
|
||||
{#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}
|
||||
|
@ -1171,7 +1171,7 @@
|
||||
"to_login": "Login",
|
||||
"to_trash": "Trash",
|
||||
"toggle_settings": "Toggle settings",
|
||||
"toggle_theme": "Toggle theme",
|
||||
"toggle_theme": "Toggle dark theme",
|
||||
"total_usage": "Total usage",
|
||||
"trash": "Trash",
|
||||
"trash_all": "Trash All",
|
||||
|
Loading…
Reference in New Issue
Block a user