Skip to content

fix(a11y): add tooltips and aria attributes to agent view toggle#1937

Open
bluzername wants to merge 1 commit intopaperclipai:masterfrom
bluzername:fix/agent-view-toggle-a11y
Open

fix(a11y): add tooltips and aria attributes to agent view toggle#1937
bluzername wants to merge 1 commit intopaperclipai:masterfrom
bluzername:fix/agent-view-toggle-a11y

Conversation

@bluzername
Copy link
Copy Markdown

Problem

On the Agents page, there are two small icon buttons for switching between list view and org chart view. But these buttons had:

  • No title attribute, so hovering show nothing
  • No aria-label, so screen readers just say "button"
  • No aria-pressed, so no way to know which view is active
  • No role="group" on the container

I was confused the first time I see these buttons because one is a list icon and the other is a git-branch icon, and without hovering or clicking I had no idea what they do. Specially the git-branch icon - is it for branches? Repos? No, it's for org chart view.

What I changed

  • Added title to each button: "List view" and "Org chart view"
  • Added aria-label matching the title for screen readers
  • Added aria-pressed to indicate which view is currently selected
  • Added role="group" with aria-label="View mode" on the container div

How to test

  1. Go to Agents page (must have more than 1 agent for toggle to appear)
  2. Hover over the list icon - should see "List view" tooltip
  3. Hover over the branch icon - should see "Org chart view" tooltip
  4. Use screen reader - should announce "List view, pressed" or "Org chart view, not pressed"

1 file, 7 lines added.

The list/org view toggle buttons on the Agents page was two
icon-only buttons with no title, no aria-label, and no
aria-pressed. Users could not tell what each icon mean without
clicking it, and screen readers had zero context.

Added:
- title="List view" / "Org chart view" for hover tooltips
- aria-label for screen reader announcement
- aria-pressed to indicate which view is currently active
- role="group" with aria-label on the container

Now hovering over the icons show what each view is, and screen
readers announce "List view, pressed" vs "Org chart view, not
pressed".
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR adds accessibility improvements to the Agents page view toggle, including title tooltips, aria-label, aria-pressed state indicators, and a role=\"group\" container label. The code changes are small and technically correct.\n\nPR description gap: The description is missing the thinking path format required by CONTRIBUTING.md. It should open with a chain of reasoning from Paperclip's top-level purpose down to this specific fix (see the examples in CONTRIBUTING.md). It should also include details on risks (even if low).\n\nAdditionally, since there is a visible UI change (tooltips now appear on hover), CONTRIBUTING.md asks for before/after screenshots — please add them. A quick screen capture showing the "List view" and "Org chart view" tooltips on hover would satisfy this requirement.

Confidence Score: 5/5

Safe to merge — the code changes are correct WAI-ARIA additions with no functional risk.

All changes are additive HTML attribute additions. aria-pressed with a boolean expression is the correct pattern, role="group" is a valid container role, and the title/aria-label pair is a well-established approach for icon buttons. No logic, state, or rendering paths are altered. The only open item is the PR description format (missing thinking path and screenshots), which is a process concern rather than a code defect.

No files require special attention.

Important Files Changed

Filename Overview
ui/src/pages/Agents.tsx Adds role="group", aria-label, title, and aria-pressed to the view-toggle button group — implementation is technically correct and follows WAI-ARIA semantics.

Reviews (1): Last reviewed commit: "fix(a11y): add labels and aria-pressed t..." | Re-trigger Greptile

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