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:
Daniel Barrientos Anariba 2026-04-28 20:48:59 -06:00 committed by GitHub
parent 57fc85f434
commit bdea9ed6a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: {