From 222d7d21ff93786b0c2274654963901fe9b10fd8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 09:04:19 +0000 Subject: [PATCH] Palette: Add dynamic aria-labels to notification bell - Adds dynamic `aria-label` to the notification bell button (e.g., "Notifications, 3 unread"). - Marks the bell icon and unread dot as `aria-hidden="true"` to reduce screen reader noise. - Documents the learning about dynamic state indicators in `.Jules/palette.md`. Co-authored-by: vireapp <260846454+vireapp@users.noreply.github.com> --- .Jules/palette.md | 9 ++++ .../notifications/notification-bell.tsx | 8 ++- src/lib/supabase/server.ts | 2 +- verify_bell.py | 50 +++++++++++++++++++ 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .Jules/palette.md create mode 100644 verify_bell.py diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..d6cdb4a --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,9 @@ +# Palette's Journal + +## 2024-05-22 - [Initial Setup] +**Learning:** This journal was missing, so I created it to track critical UX/accessibility learnings. +**Action:** Ensure this file is checked before starting work in the future. + +## 2024-05-22 - [Dynamic State Labels] +**Learning:** Dynamic state indicators (like notification badges or status dots) often lack accessible text equivalents in this codebase, relying solely on visual cues (colors/dots). +**Action:** Always check icon-only buttons for `aria-label` and ensure the label reflects the *current state* (e.g., "Notifications, 3 unread") rather than just the static name ("Notifications"). diff --git a/src/components/notifications/notification-bell.tsx b/src/components/notifications/notification-bell.tsx index 318e870..9b4ea47 100644 --- a/src/components/notifications/notification-bell.tsx +++ b/src/components/notifications/notification-bell.tsx @@ -82,10 +82,14 @@ export function NotificationBell() { variant="ghost" size="icon" className="relative text-foreground/70 hover:text-foreground hover:bg-accent/10" + aria-label={count > 0 ? `Notifications, ${count} unread` : "Notifications"} > - +