Skip to content

The open-source app everyone uses to manage agents at work

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

Evyatar Bluzerc5d73844a55d
diff --git a/ui/src/pages/Agents.tsx b/ui/src/pages/Agents.tsx
index 519496368b..c957d3bed3 100644
--- a/ui/src/pages/Agents.tsx
+++ b/ui/src/pages/Agents.tsx
@@ -404,13 +404,16 @@ export function Agents() {
<div className="flex items-center gap-2">
{/* View toggle */}
{!forceListView && (
- <div className="flex items-center border border-border">
+ <div className="flex items-center border border-border" role="group" aria-label="View mode">
<button
className={cn(
"p-1.5 transition-colors",
effectiveView === "list" ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent/50"
)}
onClick={() => setView("list")}
+ title="List view"
+ aria-label="List view"
+ aria-pressed={effectiveView === "list"}
>
<List className="h-3.5 w-3.5" />
</button>
@@ -420,6 +423,9 @@ export function Agents() {
effectiveView === "org" ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent/50"
)}
onClick={() => setView("org")}
+ title="Org chart view"
+ aria-label="Org chart view"
+ aria-pressed={effectiveView === "org"}
>
<GitBranch className="h-3.5 w-3.5" />
</button>