🎨 Palette: Add ARIA labels and states to MediaGalleryView buttons#285
🎨 Palette: Add ARIA labels and states to MediaGalleryView buttons#285Dexploarer wants to merge 1 commit intodevelopfrom
Conversation
- Adds `aria-pressed` to filter chips. - Fixes Lightbox close button to use `aria-label` and `aria-hidden` span for the `×` symbol.
|
👋 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. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello, 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 Highlights
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| <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> |
There was a problem hiding this comment.
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.
💡 What
Added missing accessibility attributes to the buttons in
MediaGalleryView.tsx. Specifically, addedaria-pressedto the filter chips to indicate which one is active, and added anaria-label="Close"along with anaria-hiddenspan 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 anaria-labelandaria-hiddenon 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
aria-pressedreflecting their toggle state.aria-label="Close"and hides the visual×symbol from screen readers.PR created automatically by Jules for task 15851940864932800099 started by @Dexploarer