Skip to content

🎨 Palette: [UX improvement] Add ARIA labels and focus rings to icon-only buttons in AgentCard#107

Open
bobdivx wants to merge 1 commit into
devfrom
palette/agent-card-a11y-16911729596696815191
Open

🎨 Palette: [UX improvement] Add ARIA labels and focus rings to icon-only buttons in AgentCard#107
bobdivx wants to merge 1 commit into
devfrom
palette/agent-card-a11y-16911729596696815191

Conversation

@bobdivx

@bobdivx bobdivx commented Jun 10, 2026

Copy link
Copy Markdown
Owner

💡 What: Added aria-labels, focus-visible styling (keyboard focus rings), and aria-hidden="true" on SVGs to the icon-only action buttons (Lancer, Arrêter, Configurer) in the AgentCard component.
🎯 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 the Tab key.
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

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

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
forge Ready Ready Preview, Comment Jun 10, 2026 5:40pm

@gemini-code-assist gemini-code-assist 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.

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'}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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]"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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]"

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