Skip to content

🎨 Palette: Improve rating UX and general accessibility#48

Open
Gamepulse wants to merge 1 commit into
Devfrom
palette/improve-rating-ux-and-a11y-5546363605467897973
Open

🎨 Palette: Improve rating UX and general accessibility#48
Gamepulse wants to merge 1 commit into
Devfrom
palette/improve-rating-ux-and-a11y-5546363605467897973

Conversation

@Gamepulse

Copy link
Copy Markdown
Owner

This PR introduces several micro-UX and accessibility improvements:

  1. Rating UX: Added a "Clear Rating" button next to the personal rating scale in the game detail view. Since range inputs cannot natively represent a "null" state once changed, this provides a way for users to unset their rating.
  2. Keyboard Accessibility: GameCard components now support full keyboard navigation. They are marked as buttons, can be focused, and triggered via Enter or Space keys.
  3. Semantic HTML: Associated "Platform" and "Personal Rating" labels with their respective controls using id and htmlFor.
  4. Screen Reader Optimization:
    • Added aria-label to the Favorite toggle button and Quick Assign buttons.
    • Marked decorative emojis (📁, 🌐, 🎮) and redundant range bound labels (0, 100) as aria-hidden="true".
  5. Robust Event Handling: Implemented a check in GameCard to differentiate between clicks on the card itself and clicks on nested interactive elements (like tags or buttons) when using the new role="button" container.
  6. Build Fix: Removed an unused hasIgdbId state in GameScreenshotsCarousel.tsx that 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

- 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>
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant