♿️(frontend) Announce mic/camera state to screen readers on shortcut toggle#1052
♿️(frontend) Announce mic/camera state to screen readers on shortcut toggle#1052
Conversation
248e2ad to
14e85dd
Compare
14e85dd to
abba38e
Compare
abba38e to
452e523
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
WalkthroughThis pull request adds screen reader announcements for microphone and camera device state changes triggered via keyboard shortcuts. The implementation imports a screen reader utility in the ToggleDevice component to announce state changes, and adds localized strings in English, German, French, and Dutch for "turned on" and "turned off" messages for both camera and microphone devices. A changelog entry documents the feature addition. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsx`:
- Around line 95-102: The handler currently derives the announced state from
!enabled after awaiting toggle(), which can be wrong if toggle fails or races;
change the handler to compute nextState = !enabled before calling toggle, call
await toggle(nextState) (pass the intended state into toggle), and only call
announce(...) after the awaited toggle resolves successfully (handle
errors/no-ops by not announcing). Update references in this handler to use
nextState when building the i18n key (t) and keep announce(..., 'assertive')
only on successful completion.
ℹ️ Review info
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
CHANGELOG.mdsrc/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsxsrc/frontend/src/locales/de/rooms.jsonsrc/frontend/src/locales/en/rooms.jsonsrc/frontend/src/locales/fr/rooms.jsonsrc/frontend/src/locales/nl/rooms.json
src/frontend/src/features/rooms/livekit/components/controls/Device/ToggleDevice.tsx
Show resolved
Hide resolved
452e523 to
45cb531
Compare
a3ccf90 to
3e6571a
Compare
announce "Microphone/Camera turned on/off" when toggling via keyboard shortcut so screen reader users get feedback
3e6571a to
1d23cb8
Compare
|



Purpose
No SR feedback when toggling mic/camera via keyboard shortcut.
issue : #875
Proposal
Announce mic/camera state to screen readers on shortcut toggle.