Skip to content

🎨 Palette: [UX improvement] Add ARIA labels and focus rings to AgentCard action buttons#117

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

🎨 Palette: [UX improvement] Add ARIA labels and focus rings to AgentCard action buttons#117
bobdivx wants to merge 1 commit into
devfrom
palette-a11y-agent-card-17882960572045317413

Conversation

@bobdivx

@bobdivx bobdivx commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Added explicit accessibility attributes and keyboard focus rings to icon-only action buttons. Also updated the .jules/palette.md journal.


PR created automatically by Jules for task 17882960572045317413 started by @bobdivx

…ard action buttons

💡 What: Added explicit `aria-label` attributes, hid decorative SVGs with `aria-hidden="true"`, and applied Tailwind `focus-visible` ring utilities to the icon-only action buttons in `AgentCard`.
🎯 Why: Icon-only buttons used for agent actions (start/stop/configure) were relying solely on `title` attributes without proper accessibility labeling or visible keyboard focus rings. This change ensures screen reader compatibility and visible keyboard navigation.
📸 Before/After: Keyboard focus is now clearly visible with an emerald ring, and SVGs are correctly hidden from the accessibility tree.
♿ Accessibility: Improved screen reader announcements and visible keyboard focus for critical interactive elements in the swarm dashboard.

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 14, 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 14, 2026 5:29pm

@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 icon-only buttons in the agent cards by adding explicit aria-label attributes, hiding decorative SVGs with aria-hidden="true", and introducing Tailwind focus-visible ring utilities. It also documents these changes in .jules/palette.md. The feedback recommends adding focus-visible:ring-offset-2 to the focus rings to resolve contrast issues on dark backgrounds and ensure visual consistency across interactive elements.

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.

onClick={() => onSwarmCommand?.(agent.id, cmd)}
disabled={commandBusy}
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'}`}

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

The focus ring color focus-visible:ring-[#175B37] (a dark green) has extremely low contrast against the dark gray background (bg-gray-900 / hover:bg-black) of the 'Lancer une mission' button. This makes the focus indicator nearly invisible for keyboard users, which defeats the purpose of adding focus rings for accessibility (WCAG 2.1 SC 1.4.11 Non-text Contrast).\n\nAdding focus-visible:ring-offset-2 will introduce a light/white gap between the dark button and the dark green ring, making the focus indicator highly visible and compliant.

Suggested change
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'}`}
class={`rounded-xl border p-2 transition-all disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-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'}`}

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

To maintain consistency with the other action buttons, add focus-visible:ring-offset-2 to the configuration button's focus ring classes as well.

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]"
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-offset-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