From e3cd742bc59767e258186d5ded41228e4edc6bb4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 09:54:33 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20accessibili?= =?UTF-8?q?ty=20with=20ARIA=20labels=20for=20icon-only=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds `aria-label` attributes to various icon-only buttons across the application to improve accessibility for screen reader users. Components updated include Header, MobileIconsBar, ChatPanel, FollowupPanel, History, HeaderSearchButton, and CalendarNotepad. Key improvements: - Added descriptive labels to navigation and action buttons. - Ensured all icon-only buttons provide contextual information to assistive technologies. - Added a label to the note textarea in the calendar notepad. - Verified changes with Playwright screenshots. Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com> --- .jules/palette.md | 3 +++ components/calendar-notepad.tsx | 10 +++++++++- components/chat-panel.tsx | 4 +++- components/followup-panel.tsx | 1 + components/header-search-button.tsx | 1 + components/header.tsx | 31 +++++++++++++++++++++++++---- components/history.tsx | 1 + components/mobile-icons-bar.tsx | 12 +++++------ 8 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 .jules/palette.md diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..d32b6cfd --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2025-05-15 - [Accessibility: Icon-Only Button Labels] +**Learning:** Icon-only buttons without explicit `aria-label` attributes are inaccessible to screen reader users, as they often lack descriptive text content. While `title` attributes provide some information on hover, they are not a substitute for `aria-label` in terms of accessibility standards. +**Action:** Always ensure icon-only buttons have an `aria-label` or an `sr-only` span describing their action. This project now consistently uses `aria-label` for common interface actions like toggling history, opening calendars, and submitting forms. diff --git a/components/calendar-notepad.tsx b/components/calendar-notepad.tsx index 41decd98..a22f2c2f 100644 --- a/components/calendar-notepad.tsx +++ b/components/calendar-notepad.tsx @@ -97,6 +97,7 @@ export function CalendarNotepad({ chatId }: CalendarNotepadProps) { @@ -124,6 +125,7 @@ export function CalendarNotepad({ chatId }: CalendarNotepadProps) { @@ -138,10 +140,12 @@ export function CalendarNotepad({ chatId }: CalendarNotepadProps) { placeholder="Add note... (⌘+Enter to save, @mention, #location)" className="w-full p-2 bg-input rounded-md border focus:ring-ring focus:ring-2 focus:outline-none pr-10" rows={3} + aria-label="Add a note" /> @@ -160,7 +164,11 @@ export function CalendarNotepad({ chatId }: CalendarNotepadProps) {

{note.content}

{note.locationTags && ( - )} diff --git a/components/chat-panel.tsx b/components/chat-panel.tsx index ca2fbc6f..8eeffc27 100644 --- a/components/chat-panel.tsx +++ b/components/chat-panel.tsx @@ -177,6 +177,7 @@ export const ChatPanel = forwardRef(({ messages, i onClick={() => handleClear()} data-testid="new-chat-button" title="New Chat" + aria-label="New chat" > @@ -225,6 +226,7 @@ export const ChatPanel = forwardRef(({ messages, i )} onClick={handleAttachmentClick} data-testid="desktop-attachment-button" + aria-label="Attach file" > @@ -295,7 +297,7 @@ export const ChatPanel = forwardRef(({ messages, i {selectedFile.name} - diff --git a/components/followup-panel.tsx b/components/followup-panel.tsx index 53321e1a..8c4e0fbb 100644 --- a/components/followup-panel.tsx +++ b/components/followup-panel.tsx @@ -59,6 +59,7 @@ export function FollowupPanel() { disabled={input.length === 0} variant={'ghost'} className="absolute right-1" + aria-label="Send message" > diff --git a/components/header-search-button.tsx b/components/header-search-button.tsx index 04896457..e65e86f3 100644 --- a/components/header-search-button.tsx +++ b/components/header-search-button.tsx @@ -154,6 +154,7 @@ export function HeaderSearchButton() { onClick={handleResolutionSearch} disabled={isAnalyzing || !map || !actions} title="Analyze current map view" + aria-label="Analyze current map view" > {isAnalyzing ? (
diff --git a/components/header.tsx b/components/header.tsx index fd80bc44..5d3edbcd 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -52,7 +52,13 @@ export const Header = () => {
-
- @@ -89,7 +107,12 @@ export const Header = () => { {/* Mobile menu buttons */}
- diff --git a/components/history.tsx b/components/history.tsx index 5bae1a39..ebbfc5c5 100644 --- a/components/history.tsx +++ b/components/history.tsx @@ -19,6 +19,7 @@ export function History({ location }: HistoryProps) { })} data-testid="history-button" onClick={toggleHistory} + aria-label="Toggle history" > {location === 'header' ? : } diff --git a/components/mobile-icons-bar.tsx b/components/mobile-icons-bar.tsx index d0db2cfa..9cffdae1 100644 --- a/components/mobile-icons-bar.tsx +++ b/components/mobile-icons-bar.tsx @@ -37,26 +37,26 @@ export const MobileIconsBar: React.FC = ({ onAttachmentClic return (
- - - - - -