[deep-review] C12: RecordingConsentDialog is a WindowEx, not a ContentDialog — fails assistive tech
Summary
RecordingConsentDialog is the privacy-critical consent dialog gating screen.record and camera.clip — the user must approve every recording. It is implemented as a WindowEx, not a ContentDialog. Consequences for accessibility:
- It's not properly modal for assistive tech — screen readers treat it as a sibling window rather than a modal blocker over the parent.
- The Allow / Deny buttons have no
AutomationProperties.Nameset, so Narrator reads only the default content. - Keyboard focus does not always land on the safe-default (Deny) button.
Where
src/OpenClaw.Tray.WinUI/Dialogs/RecordingConsentDialog.cs:137-160
Why it matters
For a screen-reader user, the consent dialog is the only line of defense between an agent and the camera/screen. If the dialog isn't modal or its buttons aren't labelled, the user may not know what they're consenting to, or may not be able to reliably activate Deny.
Note: most other tray dialogs use WindowEx deliberately because XamlRoot is unreliable on tray-owned windows. The reasoning is documented. But the consent dialog is the most accessibility-sensitive surface in the entire app and warrants a different choice.
Proposed fix
Two options:
- Promote to
ContentDialog: parent it to a temporary owner window that's set up correctly forXamlRoot. AddAutomationProperties.Nameto Allow and Deny. Set default focus to Deny. SetXamlRootfrom the parent's XamlRoot, with a fallback for the headless path. - Keep
WindowExbut harden: addAutomationProperties.Nameto all buttons; setOwnerHWND viaSetWindowLong(GWLP_HWNDPARENT, ...)so the OS treats it as modal-to-owner; set initial keyboard focus to Deny; setAutomationProperties.LiveSetting=Assertiveon the dialog content.
Either way, add a UI test that asserts the dialog passes a basic accessibility audit (every interactive element has a Name; default focus is on a safe action).
Severity
Critical — accessibility regression on the consent surface that gates camera and screen access.
Closing this one-off deep-review issue as consolidated, not necessarily fixed. The useful signal is preserved in #372: recording consent accessibility should be re-verified against current consent/settings UX. We will take these one at a time from #372 after verifying against current master instead of keeping the issue list flooded.