From 6f1ddf82d87331d8ad277df151e30f2da592595a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 08:50:03 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20ARIA=20labels?= =?UTF-8?q?=20to=20Video=20Grid=20controls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds dynamic aria-labels to the microphone, camera, and screen-sharing controls within `VideoGrid` component. This ensures screen readers can accurately interpret the state and purpose of these icon-only buttons. Co-authored-by: vireapp <260846454+vireapp@users.noreply.github.com> --- .Jules/palette.md | 3 +++ src/components/room/video-grid.tsx | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 .Jules/palette.md diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 0000000..401025d --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2024-03-20 - Icon-Only Button ARIA Labels +**Learning:** Found a recurring pattern in `VideoGrid` where icon-only control buttons for Mic, Cam, and Screen Share lacked proper `aria-label` attributes, making them inaccessible to screen readers. They also had dynamic states (on/off) which should be reflected in the label. +**Action:** Always ensure that any button containing only an icon component (like those from `lucide-react`) has a descriptive, dynamic `aria-label` that reflects its current state and action. diff --git a/src/components/room/video-grid.tsx b/src/components/room/video-grid.tsx index bc3ebd1..7571573 100644 --- a/src/components/room/video-grid.tsx +++ b/src/components/room/video-grid.tsx @@ -85,13 +85,13 @@ export function VideoGrid({ {/* In-Card Controls - Mobile Only (Bottom Bar handles Desktop) */}
- - -
@@ -121,6 +121,7 @@ export function VideoGrid({ !canToggleMic && "opacity-50 cursor-not-allowed" )} title={isMicOn ? "Mute Microphone" : "Unmute Microphone"} + aria-label={isMicOn ? "Mute Microphone" : "Unmute Microphone"} > {isMicOn ? : } @@ -136,6 +137,7 @@ export function VideoGrid({ !canToggleCam && "opacity-50 cursor-not-allowed" )} title={isCamOn ? "Turn Camera Off" : "Turn Camera On"} + aria-label={isCamOn ? "Turn Camera Off" : "Turn Camera On"} > {isCamOn ?