From 9843e8bdf154b11c8060e1b551d290bc22f55e9d Mon Sep 17 00:00:00 2001 From: Lotus Bot Date: Thu, 21 May 2026 13:17:07 -0400 Subject: [PATCH] fix(a11y): label remaining unlabeled icon buttons across 12 components\n\nCo-Authored-By: Claude Sonnet 4.6 --- src/app/components/DeviceVerificationSetup.tsx | 2 +- src/app/components/editor/Toolbar.tsx | 5 ++++- src/app/components/user-profile/PowerChip.tsx | 2 +- src/app/features/call-status/CallControl.tsx | 2 ++ src/app/features/call/Controls.tsx | 2 ++ .../common-settings/general/RoomEncryption.tsx | 2 +- .../features/common-settings/general/RoomUpgrade.tsx | 2 +- src/app/features/lobby/HierarchyItemMenu.tsx | 4 +++- src/app/features/room/RoomViewHeader.tsx | 4 +++- src/app/features/room/RoomViewTyping.tsx | 2 +- src/app/features/room/message/Message.tsx | 10 ++++++---- src/app/features/room/message/MessageEditor.tsx | 6 +++++- 12 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/app/components/DeviceVerificationSetup.tsx b/src/app/components/DeviceVerificationSetup.tsx index 1e13e2f97..4f0be6b1f 100644 --- a/src/app/components/DeviceVerificationSetup.tsx +++ b/src/app/components/DeviceVerificationSetup.tsx @@ -336,7 +336,7 @@ export const DeviceVerificationReset = forwardRef Reset Device Verification - + diff --git a/src/app/components/editor/Toolbar.tsx b/src/app/components/editor/Toolbar.tsx index b6be7b878..d98080205 100644 --- a/src/app/components/editor/Toolbar.tsx +++ b/src/app/components/editor/Toolbar.tsx @@ -217,7 +217,9 @@ export function HeadingBlockButton() { style={{ width: 'unset' }} variant="SurfaceVariant" onClick={handleMenuOpen} - aria-pressed={isActive} + aria-label={level ? `Heading ${level}` : 'Heading'} + aria-expanded={isActive} + aria-haspopup="menu" size="400" radii="300" > @@ -373,6 +375,7 @@ export function Toolbar() { ref={triggerRef} variant="SurfaceVariant" onClick={() => setIsMarkdown(!isMarkdown)} + aria-label={isMarkdown ? 'Disable Markdown' : 'Enable Markdown'} aria-pressed={isMarkdown} size="300" radii="300" diff --git a/src/app/components/user-profile/PowerChip.tsx b/src/app/components/user-profile/PowerChip.tsx index 2c8bd196a..ce3875927 100644 --- a/src/app/components/user-profile/PowerChip.tsx +++ b/src/app/components/user-profile/PowerChip.tsx @@ -120,7 +120,7 @@ function SharedPowerAlert({ power, onCancel, onChange }: SharedPowerAlertProps) Shared Power - + diff --git a/src/app/features/call-status/CallControl.tsx b/src/app/features/call-status/CallControl.tsx index 475089df6..35440cbb5 100644 --- a/src/app/features/call-status/CallControl.tsx +++ b/src/app/features/call-status/CallControl.tsx @@ -31,6 +31,8 @@ function MicrophoneButton({ enabled, onToggle, disabled }: MicrophoneButtonProps onClick={() => onToggle()} outlined disabled={disabled} + aria-label={enabled ? 'Turn off microphone' : 'Turn on microphone'} + aria-pressed={!enabled} > diff --git a/src/app/features/call/Controls.tsx b/src/app/features/call/Controls.tsx index 4bcaf5c96..9bf179a92 100644 --- a/src/app/features/call/Controls.tsx +++ b/src/app/features/call/Controls.tsx @@ -108,6 +108,8 @@ export function VideoButton({ enabled, onToggle, disabled }: VideoButtonProps) { onClick={() => onToggle()} outlined disabled={disabled} + aria-label={disabled ? 'Camera disabled in settings' : enabled ? 'Stop camera' : 'Start camera'} + aria-pressed={enabled} style={disabled ? { opacity: 0.4, cursor: 'not-allowed' } : undefined} > Enable Encryption - setPrompt(false)} radii="300"> + setPrompt(false)} radii="300" aria-label="Cancel"> diff --git a/src/app/features/common-settings/general/RoomUpgrade.tsx b/src/app/features/common-settings/general/RoomUpgrade.tsx index 45a480aa3..754b5e6f4 100644 --- a/src/app/features/common-settings/general/RoomUpgrade.tsx +++ b/src/app/features/common-settings/general/RoomUpgrade.tsx @@ -105,7 +105,7 @@ function RoomUpgradeDialog({ requestClose }: { requestClose: () => void }) { {room.isSpaceRoom() ? 'Space Upgrade' : 'Room Upgrade'} - + diff --git a/src/app/features/lobby/HierarchyItemMenu.tsx b/src/app/features/lobby/HierarchyItemMenu.tsx index c6aff741d..72659fb4b 100644 --- a/src/app/features/lobby/HierarchyItemMenu.tsx +++ b/src/app/features/lobby/HierarchyItemMenu.tsx @@ -240,7 +240,9 @@ export function HierarchyItemMenu({ variant="SurfaceVariant" fill="None" radii="300" - aria-pressed={!!menuAnchor} + aria-label="More options" + aria-expanded={!!menuAnchor} + aria-haspopup="menu" > diff --git a/src/app/features/room/RoomViewHeader.tsx b/src/app/features/room/RoomViewHeader.tsx index 50f0e150c..4e6e146e1 100644 --- a/src/app/features/room/RoomViewHeader.tsx +++ b/src/app/features/room/RoomViewHeader.tsx @@ -638,7 +638,9 @@ export function RoomViewHeader({ callView }: { callView?: boolean }) { fill="None" onClick={handleOpenMenu} ref={triggerRef} - aria-pressed={!!menuAnchor} + aria-label="More options" + aria-expanded={!!menuAnchor} + aria-haspopup="menu" > diff --git a/src/app/features/room/RoomViewTyping.tsx b/src/app/features/room/RoomViewTyping.tsx index fa5a21f80..e4bd1d819 100644 --- a/src/app/features/room/RoomViewTyping.tsx +++ b/src/app/features/room/RoomViewTyping.tsx @@ -117,7 +117,7 @@ export const RoomViewTyping = as<'div', RoomViewTypingProps>( )} - + diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index b8e714225..4335513ed 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -496,7 +496,7 @@ export const MessageDeleteItem = as< Delete Message - + @@ -626,7 +626,7 @@ export const MessageReportItem = as< Report Message - + @@ -1207,8 +1207,9 @@ export const Message = React.memo(as<'div', MessageProps>( size="300" radii="300" onClick={handleOpenMenu} + aria-label="More options" aria-expanded={!!menuAnchor} - aria-haspopup="menu" + aria-haspopup="menu" > @@ -1377,8 +1378,9 @@ export const Event = React.memo(as<'div', EventProps>( size="300" radii="300" onClick={handleOpenMenu} + aria-label="More options" aria-expanded={!!menuAnchor} - aria-haspopup="menu" + aria-haspopup="menu" > diff --git a/src/app/features/room/message/MessageEditor.tsx b/src/app/features/room/message/MessageEditor.tsx index 9a7567aac..a09ad24d4 100644 --- a/src/app/features/room/message/MessageEditor.tsx +++ b/src/app/features/room/message/MessageEditor.tsx @@ -293,6 +293,8 @@ export const MessageEditor = as<'div', MessageEditorProps>( size="300" radii="300" onClick={() => setToolbar(!toolbar)} + aria-label={toolbar ? 'Hide formatting toolbar' : 'Show formatting toolbar'} + aria-pressed={toolbar} > @@ -322,7 +324,9 @@ export const MessageEditor = as<'div', MessageEditorProps>( } > setAnchor(