mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
fix(playerbar): add Mute / Unmute tooltip on the speaker icon (#752)
The speaker button in the player bar toggled volume to 0 (or back to the pre-mute level) but exposed no `data-tooltip`, so hovering it showed nothing — users couldn't tell what the icon did. Add a tooltip that switches between "Mute" and "Unmute" with the current state, and mirror the same string on `aria-label` for screen readers. New `player.mute` / `player.unmute` keys land across all 9 locales.
This commit is contained in:
committed by
GitHub
parent
04149c048e
commit
48c7b8b780
@@ -40,7 +40,8 @@ export function PlayerVolume({
|
||||
setVolume(0);
|
||||
}
|
||||
}}
|
||||
aria-label={t('player.volume')}
|
||||
aria-label={volume === 0 ? t('player.unmute') : t('player.mute')}
|
||||
data-tooltip={volume === 0 ? t('player.unmute') : t('player.mute')}
|
||||
style={{ color: 'var(--text-muted)', flexShrink: 0 }}
|
||||
>
|
||||
{volume === 0 ? <VolumeX size={16} /> : <Volume2 size={16} />}
|
||||
|
||||
Reference in New Issue
Block a user