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 ?