🎨 Palette: Improve rating UX and general accessibility#48
Conversation
- Added a "Clear Rating" button to allow resetting personal ratings to null.
- Improved `GameCard` accessibility by adding `role="button"`, `tabIndex={0}`, and keyboard navigation support.
- Enhanced form accessibility in `GameDetailHeader` with proper label associations and ARIA attributes.
- Marked decorative emojis and range bound labels as `aria-hidden`.
- Fixed a TypeScript build error in `GameScreenshotsCarousel.tsx`.
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
Here are some automated review suggestions for this pull request.
Reviewed commit: b7bd4f63c7
ℹ️ 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".
| <div | ||
| className="theme-card theme-border border rounded-lg overflow-hidden cursor-pointer transition-all duration-300 hover:scale-105 hover:shadow-xl hover:border-gray-600" | ||
| className="theme-card theme-border border rounded-lg overflow-hidden cursor-pointer transition-all duration-300 hover:scale-105 hover:shadow-xl hover:border-gray-600 focus-within:ring-2 focus-within:ring-indigo-500 outline-none" | ||
| role="button" |
There was a problem hiding this comment.
Remove the nested button role from cards
With role="button" on the whole card, the existing tag/status controls and quick-assign <button> rendered inside the card become interactive descendants of another interactive element. In the grid/compact/list card views, screen-reader and keyboard users can get an invalid accessibility tree where the child controls are announced incorrectly or are hard to reach, which regresses the filtering/quick-assign actions this component already exposes. Prefer making only a non-overlapping child such as the cover/title the button, or provide a separate focusable control instead of assigning a button role to the container.
Useful? React with 👍 / 👎.
This PR introduces several micro-UX and accessibility improvements:
GameCardcomponents now support full keyboard navigation. They are marked as buttons, can be focused, and triggered via Enter or Space keys.idandhtmlFor.aria-labelto the Favorite toggle button and Quick Assign buttons.aria-hidden="true".GameCardto differentiate between clicks on the card itself and clicks on nested interactive elements (like tags or buttons) when using the newrole="button"container.hasIgdbIdstate inGameScreenshotsCarousel.tsxthat was causing production build failures.All changes are localized in English and French. Verified with
pnpm test,pnpm build, and automated Playwright verification.PR created automatically by Jules for task 5546363605467897973 started by @Gamepulse