🎨 Palette: [UX improvement] Add ARIA labels and focus rings to icon-only buttons in AgentCard#107
🎨 Palette: [UX improvement] Add ARIA labels and focus rings to icon-only buttons in AgentCard#107bobdivx wants to merge 1 commit into
Conversation
Added missing aria-labels and keyboard focus rings (focus-visible) to the icon-only command buttons in the AgentCard component. Wrapped nested SVG graphics with aria-hidden="true" to prevent redundant screen reader announcements. Co-authored-by: bobdivx <6737167+bobdivx@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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request improves the accessibility of the AgentCard component by adding aria-label attributes, hiding decorative SVGs from screen readers with aria-hidden="true", and adding focus-visible Tailwind classes for keyboard navigation. It also documents these accessibility practices in .jules/palette.md. The reviewer provided valuable feedback to further improve the implementation, suggesting a more descriptive ARIA label for the stop action and recommending the addition of type="button" to prevent accidental form submissions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| class={`rounded-xl border p-2 transition-all disabled:opacity-50 ${cmd === 'start_work' ? 'bg-gray-900 border-gray-900 text-white hover:bg-black' : 'bg-white border-gray-200 text-gray-400 hover:text-rose-500 hover:border-rose-200'}`} | ||
| class={`rounded-xl border p-2 transition-all disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37] ${cmd === 'start_work' ? 'bg-gray-900 border-gray-900 text-white hover:bg-black' : 'bg-white border-gray-200 text-gray-400 hover:text-rose-500 hover:border-rose-200'}`} | ||
| title={cmd === 'start_work' ? 'Lancer une mission' : 'Arrêter'} | ||
| aria-label={cmd === 'start_work' ? 'Lancer une mission' : 'Arrêter'} |
There was a problem hiding this comment.
To improve accessibility (a11y), the label for the stop action should be more descriptive. Changing 'Arrêter' to 'Arrêter la mission' provides clearer context for screen reader users, making it consistent with 'Lancer une mission'. You can also update the title attribute on line 228 to match this label for consistency.
| aria-label={cmd === 'start_work' ? 'Lancer une mission' : 'Arrêter'} | |
| aria-label={cmd === 'start_work' ? 'Lancer une mission' : 'Arrêter la mission'} |
| setConfigOpen(true); | ||
| }} | ||
| class="rounded-xl border border-gray-200 bg-white p-2 text-gray-400 transition-all hover:border-[#175B37]/30 hover:text-[#175B37]" | ||
| class="rounded-xl border border-gray-200 bg-white p-2 text-gray-400 transition-all hover:border-[#175B37]/30 hover:text-[#175B37] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" |
There was a problem hiding this comment.
It is a best practice to explicitly set type="button" on <button> elements that do not submit forms. This prevents accidental form submissions if the AgentCard component is ever nested inside a <form> element. You should also apply this to the start/stop buttons above.
| class="rounded-xl border border-gray-200 bg-white p-2 text-gray-400 transition-all hover:border-[#175B37]/30 hover:text-[#175B37] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" | |
| type="button" | |
| class="rounded-xl border border-gray-200 bg-white p-2 text-gray-400 transition-all hover:border-[#175B37]/30 hover:text-[#175B37] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#175B37]" |
💡 What: Added
aria-labels,focus-visiblestyling (keyboard focus rings), andaria-hidden="true"on SVGs to the icon-only action buttons (Lancer, Arrêter, Configurer) in theAgentCardcomponent.🎯 Why: To improve accessibility for users navigating the dashboard via screen readers (who previously received no context for these buttons) and keyboard users (who had no visual indication of focus).
📸 Before/After: The buttons now visually highlight with a green ring (
#175B37) when focused via theTabkey.♿ Accessibility: Addresses WCAG criteria for name, role, value, and visible focus. Screen readers will now announce "Lancer une mission", "Arrêter", or "Configurer cet agent (outils, prompt)" instead of attempting to read raw SVG content or ignoring the buttons entirely.
PR created automatically by Jules for task 16911729596696815191 started by @bobdivx