mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
fix(ui): show album tile actions on keyboard focus (#5434)
* fix(ui): show album tile actions on keyboard focus - #4836 The album grid tile bar (containing play/heart/context-menu buttons) had opacity:0 by default and only became visible on mouse :hover. Keyboard users tabbing through the album grid never saw which tile was focused and could not discover the available actions. Mirrors the existing :hover rule with :focus-within, which matches when the link itself or any descendant (e.g. the play button) has focus. Signed-off-by: Daniel Banariba <banaribad@gmail.com> * fix(ui): also disable pointer events on hidden album tile bar - #4836 Per review feedback (@gemini-code-assist): the tileBar's buttons remained clickable even at opacity:0, causing accidental Play/Menu triggers when a user clicked what looked like the album cover. Set 'pointerEvents: none' on the base tileBar and restore 'auto' on the same selector that turns it visible. Signed-off-by: Daniel Banariba <banaribad@gmail.com> --------- Signed-off-by: Daniel Banariba <banaribad@gmail.com>
This commit is contained in:
parent
57fc85f434
commit
bdea9ed6a1
@ -34,6 +34,7 @@ const useStyles = makeStyles(
|
||||
tileBar: {
|
||||
transition: 'all 150ms ease-out',
|
||||
opacity: 0,
|
||||
pointerEvents: 'none',
|
||||
textAlign: 'left',
|
||||
background:
|
||||
'linear-gradient(to top, rgba(0,0,0,0.7) 0%,rgba(0,0,0,0.4) 70%,rgba(0,0,0,0) 100%)',
|
||||
@ -78,8 +79,9 @@ const useStyles = makeStyles(
|
||||
position: 'relative',
|
||||
display: 'block',
|
||||
textDecoration: 'none',
|
||||
'&:hover $tileBar': {
|
||||
'&:hover $tileBar, &:focus-within $tileBar': {
|
||||
opacity: 1,
|
||||
pointerEvents: 'auto',
|
||||
},
|
||||
},
|
||||
albumLink: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user