From 01d35823ccfb05aa509fc4d315960e6a4b4aa188 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 24 Sep 2026 19:39:09 +0700 Subject: [PATCH] a11y: announce live updates for notifications, wallet balance, DMs (U3) Add aria-live="polite" to the three dynamic surfaces screen-reader users otherwise miss: - Notification bell unread-count badge (with an "N unread notifications" label so the number is announced meaningfully, not read as bare digits) - Cashu wallet balance value (announces the new balance after a send/receive completes) - Direct-message conversation thread: role="log" + aria-live so incoming messages are announced as they arrive ToastViewport already announces via the Radix default and was left untouched. Co-authored-by: shakespeare.diy --- src/components/NotificationBell.tsx | 6 +++++- src/components/wallet/CashuWalletCard.tsx | 6 +++++- src/pages/ConversationPage.tsx | 7 ++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/NotificationBell.tsx b/src/components/NotificationBell.tsx index 3fb435a..de9e168 100644 --- a/src/components/NotificationBell.tsx +++ b/src/components/NotificationBell.tsx @@ -291,7 +291,11 @@ export function NotificationBell({ className }: { className?: string }) { )} /> {badgeTotal > 0 && ( - + {badgeTotal > 9 ? '9+' : badgeTotal} )} diff --git a/src/components/wallet/CashuWalletCard.tsx b/src/components/wallet/CashuWalletCard.tsx index 40490ea..ec97c6d 100644 --- a/src/components/wallet/CashuWalletCard.tsx +++ b/src/components/wallet/CashuWalletCard.tsx @@ -380,7 +380,11 @@ function CashuWalletCardNative() {
Balance
-
+
{totalBalance.toLocaleString()} sats
diff --git a/src/pages/ConversationPage.tsx b/src/pages/ConversationPage.tsx index 668e4cb..b50e29c 100644 --- a/src/pages/ConversationPage.tsx +++ b/src/pages/ConversationPage.tsx @@ -231,7 +231,12 @@ export default function ConversationPage() {
{/* Messages Area */} -
+
{isLoading ? ( <>