Skip to content

🎨 Palette: Improve GameDetailHeader accessibility and add clear rating#51

Open
Gamepulse wants to merge 1 commit into
Devfrom
palette-game-detail-improvements-17588631665040963910
Open

🎨 Palette: Improve GameDetailHeader accessibility and add clear rating#51
Gamepulse wants to merge 1 commit into
Devfrom
palette-game-detail-improvements-17588631665040963910

Conversation

@Gamepulse

Copy link
Copy Markdown
Owner

This PR implements several micro-UX and accessibility improvements to the GameDetailHeader component.

Key changes:

  1. Clear Rating Functionality: Added a "Clear Rating" button that appears when a personal rating is set. This allows users to reset their rating to a null state, which was previously difficult as the range input always forced a value.
  2. Accessibility Enhancements:
    • Added high-contrast focus-visible rings to interactive elements (Favorite toggle, Clear button, Range input) for better keyboard navigation.
    • Improved screen reader support by adding aria-label to icon-only buttons and the range input.
    • Marked decorative range boundaries ("0" and "100") with aria-hidden="true" to reduce noise.
    • Properly linked the platform selector label to its input using htmlFor and id.
  3. Code Cleanup: Removed an unused hasIgdbId state from GameScreenshotsCarousel.tsx that was causing production build failures.
  4. Internationalization: Added localized strings for "Clear Rating" in both English and French.

These changes follow the project's design system and improve the overall usability and inclusiveness of the application.


PR created automatically by Jules for task 17588631665040963910 started by @Gamepulse

- Add 'clearRating' translation keys for English and French.
- Implement 'Clear Rating' button in GameDetailHeader to allow resetting personal ratings.
- Improve accessibility in GameDetailHeader:
    - Add aria-label and focus-visible rings to favorite toggle.
    - Hide slider boundary labels from screen readers using aria-hidden.
    - Add aria-label to the rating range input.
    - Properly associate platform selector label with its input.
- Fix pre-existing TypeScript error in GameScreenshotsCarousel.tsx (unused variable).

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.

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