From 1724b9a8df3ad04239cd1836c5058813043d0e41 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 17:24:54 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20accessibili?= =?UTF-8?q?ty=20for=20icon=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: bobdivx <6737167+bobdivx@users.noreply.github.com> --- .jules/palette.md | 3 + .../discussion/composer/ComposerInput.tsx | 65 ++++++++++++---- .../discussion/composer/DiscussionHeader.tsx | 78 +++++++++++++------ 3 files changed, 108 insertions(+), 38 deletions(-) create mode 100644 .jules/palette.md diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..530948af --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-25 - Accessibility for textual icon buttons +**Learning:** Textual icons (like `>`) used in icon-only buttons can be read confusingly by screen readers (e.g. "greater than"). It is necessary to hide them with `aria-hidden="true"` while providing a descriptive `aria-label` on the parent ` diff --git a/src/components/discussion/composer/DiscussionHeader.tsx b/src/components/discussion/composer/DiscussionHeader.tsx index 5a7815f7..98a9a1ba 100644 --- a/src/components/discussion/composer/DiscussionHeader.tsx +++ b/src/components/discussion/composer/DiscussionHeader.tsx @@ -1,7 +1,7 @@ -import type { AgentTeamProfile } from '../../../lib/agent-profile'; -import type { Project, RequestItem } from './types'; -import TeamAvatar from '../../agents/TeamAvatar'; -import { truncateText } from './types'; +import type { AgentTeamProfile } from "../../../lib/agent-profile"; +import type { Project, RequestItem } from "./types"; +import TeamAvatar from "../../agents/TeamAvatar"; +import { truncateText } from "./types"; interface Props { selectedTeamProfile?: AgentTeamProfile; @@ -15,28 +15,40 @@ interface Props { onEmptyMemberClick?: () => void; onOpenProfile?: () => void; policyBadge?: { - mode: 'off' | 'warn' | 'enforce'; - state: 'idle' | 'compliant' | 'non_compliant'; + mode: "off" | "warn" | "enforce"; + state: "idle" | "compliant" | "non_compliant"; }; } export default function DiscussionHeader({ - selectedTeamProfile, selectedAgentId, selectedProject, selectedRequest, - setHeaderMenuOpen, headerMenuOpen, copyToClipboard, onEmptyMemberClick, onOpenProfile, policyBadge + selectedTeamProfile, + selectedAgentId, + selectedProject, + selectedRequest, + setHeaderMenuOpen, + headerMenuOpen, + copyToClipboard, + onEmptyMemberClick, + onOpenProfile, + policyBadge, }: Props) { const badgeClass = - policyBadge?.state === 'compliant' - ? 'border-emerald-200 bg-emerald-50 text-emerald-700' - : policyBadge?.state === 'non_compliant' - ? 'border-rose-200 bg-rose-50 text-rose-700' - : 'border-amber-200 bg-amber-50 text-amber-700'; + policyBadge?.state === "compliant" + ? "border-emerald-200 bg-emerald-50 text-emerald-700" + : policyBadge?.state === "non_compliant" + ? "border-rose-200 bg-rose-50 text-rose-700" + : "border-amber-200 bg-amber-50 text-amber-700"; return (
{selectedTeamProfile ? ( ) : (