Skip to content

[deep-review] C12: RecordingConsentDialog is a WindowEx, not a ContentDialog — fails assistive tech #353

Closed

Description

@codemonkeychris

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:

  1. It's not properly modal for assistive tech — screen readers treat it as a sibling window rather than a modal blocker over the parent.
  2. The Allow / Deny buttons have no AutomationProperties.Name set, so Narrator reads only the default content.
  3. 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:

  1. Promote to ContentDialog: parent it to a temporary owner window that's set up correctly for XamlRoot. Add AutomationProperties.Name to Allow and Deny. Set default focus to Deny. Set XamlRoot from the parent's XamlRoot, with a fallback for the headless path.
  2. Keep WindowEx but harden: add AutomationProperties.Name to all buttons; set Owner HWND via SetWindowLong(GWLP_HWNDPARENT, ...) so the OS treats it as modal-to-owner; set initial keyboard focus to Deny; set AutomationProperties.LiveSetting=Assertive on 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.

Activity

  1. added
    bug
    on May 14, 2026
  2. linked a pull request that will close this issueHarden recording consent dialog accessibility #397on May 14, 2026
  3. shanselman commented on May 18, 2026

    @shanselman
    Collaborator

    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.

  4. locked as resolved and limited conversation to collaborators on May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions