🎨 Palette: Improve GameCard keyboard accessibility#25
Conversation
- Convert interactive spans to semantic buttons in GameCard - Add tabIndex and role="button" to GameCard containers - Implement onKeyDown for card navigation (Enter/Space) - Add focus-visible styles for better navigation visibility - Remove unused hasIgdbId state in GameScreenshotsCarousel to fix build Co-authored-by: Gamepulse <8333979+Gamepulse@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
💡 Codex Review
PPGLM/src/components/Library/GameCard.tsx
Line 176 in 577bac2
After adding role="button" to the card container, the onClick guard now always matches target.closest('[role="button"]') even when clicking non-interactive parts of the card, because closest returns the container itself. This prevents mouse navigation from ever calling onClick(game.id) in grid mode (and the same pattern is repeated in compact/list), making cards effectively unopenable by mouse.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
💡 What: Improved keyboard accessibility for the GameCard component and fixed a build-breaking unused variable.
🎯 Why: Interactive elements like tags and badges were using non-semantic spans, making them inaccessible to keyboard users. The entire card container was also not keyboard-focusable, preventing users from navigating the library without a mouse.
♿ Accessibility:
🛠️ Fixes:
PR created automatically by Jules for task 18424975363448927866 started by @Gamepulse