🎨 Palette: Improve accessibility and tooltips for icon-only buttons - #2
Marcantoinetroubat wants to merge 1 commit into
Conversation
Co-authored-by: Marcantoinetroubat <171517515+Marcantoinetroubat@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. |
There was a problem hiding this comment.
Code Review
This pull request improves accessibility and UI tooltips by adding missing title or aria-label attributes to buttons in Fork.tsx, MinimalHoverButtons.tsx, and MCPServerStatusIcon.tsx. Feedback is provided regarding a React anti-pattern in MCPServerStatusIcon.tsx, where a module-scoped variable is used to share the localize hook function across components. It is recommended to call useLocalize() directly inside each functional component to prevent potential runtime crashes and stale closures.
| onClick={onConfigClick} | ||
| className="flex size-6 items-center justify-center rounded p-1 hover:bg-surface-secondary" | ||
| aria-label={localize('com_nav_mcp_connect_server', { 0: serverName })} | ||
| title={localize('com_nav_mcp_connect_server', { 0: serverName })} |
There was a problem hiding this comment.
💡 What: Added missing
titleandaria-labelattributes to several icon-only buttons in the chat message context menus (Fork.tsx,MinimalHoverButtons.tsx) and the MCP server status component (MCPServerStatusIcon.tsx).🎯 Why: To ensure that mouse users get visual tooltip feedback on hover, and screen reader users get proper context for what the buttons do, maintaining consistency with existing components like
HoverButtons.tsx.♿ Accessibility: Improved screen reader support for the copy button and added hover tooltips to the fork, connect, and configure buttons.
PR created automatically by Jules for task 2928835206961848150 started by @Marcantoinetroubat