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 && ( - @@ -225,6 +226,7 @@ export const ChatPanel = forwardRef