Skip to content

🎨 Palette: Add ARIA labels and states to MediaGalleryView buttons#285

Draft
Dexploarer wants to merge 1 commit intodevelopfrom
palette-a11y-mediagalleryview-15851940864932800099
Draft

🎨 Palette: Add ARIA labels and states to MediaGalleryView buttons#285
Dexploarer wants to merge 1 commit intodevelopfrom
palette-a11y-mediagalleryview-15851940864932800099

Conversation

@Dexploarer
Copy link
Owner

💡 What

Added missing accessibility attributes to the buttons in MediaGalleryView.tsx. Specifically, added aria-pressed to the filter chips to indicate which one is active, and added an aria-label="Close" along with an aria-hidden span around the visual × character in the Lightbox close button.

🎯 Why

To improve the experience for screen reader users. Without aria-pressed, screen readers couldn't tell which filter was currently active. Without an aria-label and aria-hidden on the close button, screen readers would simply read out the confusing "times" symbol instead of a clear "Close" action.

📸 Before/After

(Visuals remain unchanged. Screen reader output changes from "times" to "Close" and announces the pressed state of the filter buttons.)

♿ Accessibility

  • Filter buttons now have aria-pressed reflecting their toggle state.
  • The Lightbox close button now has a clear aria-label="Close" and hides the visual × symbol from screen readers.

PR created automatically by Jules for task 15851940864932800099 started by @Dexploarer

- Adds `aria-pressed` to filter chips.
- Fixes Lightbox close button to use `aria-label` and `aria-hidden` span for the `×` symbol.
@google-labs-jules
Copy link

👋 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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 37c730c9-8a34-4165-83ff-9847aea1f9ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-a11y-mediagalleryview-15851940864932800099

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the accessibility of the MediaGalleryView component by integrating crucial ARIA attributes. The changes ensure that screen reader users receive accurate information about the state of filter buttons and the clear function of the Lightbox close button, thereby improving overall usability for assistive technology users.

Highlights

  • Accessibility for Filter Chips: Added the aria-pressed attribute to the filter chips in MediaGalleryView.tsx to clearly indicate their active state to screen reader users.
  • Accessibility for Lightbox Close Button: Implemented aria-label="Close" and wrapped the visual '×' character in an <span aria-hidden="true"> for the Lightbox close button in MediaGalleryView.tsx, ensuring screen readers announce "Close" instead of the character itself.
  • Accessibility Learning Note: Documented a learning note in .Jules/palette.md emphasizing the importance of aria-label="Close" and aria-hidden="true" for close buttons using visual characters.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request makes excellent accessibility improvements to MediaGalleryView.tsx by adding aria-pressed to filter buttons and the correct ARIA attributes to the lightbox close button. The changes are well-implemented and improve the user experience for screen reader users.

I've added a suggestion to consider creating a reusable CloseButton component. As you've identified this as a recurring pattern in .Jules/palette.md, a shared component would improve maintainability and help apply this accessibility fix consistently across the application.

It's great that you've documented the other components with similar issues. I recommend creating a follow-up task to address the accessibility of close buttons in SkillsView.tsx, DatabaseView.tsx, ChatView.tsx, and ConversationsSidebar.tsx.

Comment on lines 344 to 351
<button
type="button"
aria-label="Close"
className="text-[var(--muted)] hover:text-[var(--txt)] bg-transparent border-0 cursor-pointer text-lg px-2"
onClick={() => setLightboxItem(null)}
>
×
<span aria-hidden="true">×</span>
</button>

Choose a reason for hiding this comment

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

medium

Since this pattern of a close button using a '×' symbol appears in multiple components (as you've noted in .Jules/palette.md), consider extracting this into a reusable CloseButton component. This would improve maintainability and ensure accessibility consistency by encapsulating the required attributes (aria-label, aria-hidden) and styling. It would make it easier to apply this fix across the app and prevent future oversights.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant