openclaw-windows-node icon indicating copy to clipboard operation
openclaw-windows-node copied to clipboard

[deep-review] A6: Operator tray UI has 46 AutomationId test hooks but only 3 AutomationProperties.Name

Open codemonkeychris opened this issue 6 months ago • 1 comments

Summary

The operator-side WinUI app (the user's tray UI) treats accessibility as an afterthought. Hard counts across the project:

  • AutomationProperties.AutomationId — 46 instances (these are test hooks; screen readers ignore them)
  • AutomationProperties.Name — 3 instances (this is the actual screen-reader property)

By contrast, the A2UI native renderer has AutomationHelpers.Apply on every interactive renderer and most display renderers — accessibility was designed in from day one for that subsystem. The tray app itself never got the same treatment.

Where

  • Tray app XAML / code-behind: src/OpenClaw.Tray.WinUI/Pages/*.xaml, Windows/*.xaml, Dialogs/*.cs
  • Compare to: src/OpenClaw.Tray.WinUI/A2UI/Rendering/AutomationHelpers.cs and call sites in Renderers/InteractiveRenderers.cs:48-50, :93, :183
  • Specific holes worth flagging:
    • Custom title bar 🦞 emoji TextBlock has no AccessibilityView="Raw" → Narrator reads "lobster"
    • AutoSuggestBox items in HubWindow's search are unlabelled
    • CommandPaletteDialog items are unlabelled
    • RecordingConsentDialog Allow/Deny buttons (see also C12)

Why it matters

The operator UI is the user's primary surface — gateway status, sessions, settings, deep-link approvals, command-center diagnostics. A screen-reader user navigating it gets generic "Button", "TextBlock", "Image" rather than meaningful labels.

This is a regression compared to the team's own work in A2UI, which proves the patterns are known and implementable. The tray UI just hasn't applied them.

Proposed fix

Three-phase:

  1. Audit pass: grep for every interactive control (Button, ToggleSwitch, AutoSuggestBox, ComboBox, ListView, custom title-bar elements) and add AutomationProperties.Name="…" referencing a localized string. Hide emoji decorations from Narrator with AutomationProperties.AccessibilityView="Raw" or AutomationProperties.Name="" on the parent.
  2. Test: add a UI test in OpenClaw.Tray.UITests that walks the visual tree of each Page / Window / Dialog and asserts every interactive element has either a Name or a LabeledBy reference. Fails the build if a new element lands without a label.
  3. Document: add a one-page accessibility guide for contributors. Probably docs/ACCESSIBILITY.md.

Severity

High — accessibility regression across the entire operator UI surface.

Related

  • C12 (RecordingConsentDialog specifically)
  • A7 (RTL and HighContrast — same root cause: accessibility was deprioritized for the tray UI)

codemonkeychris avatar May 14 '26 00:05 codemonkeychris

Closing during the post-refactor deep-review cleanup. AutomationProperties coverage is accessibility debt, consolidated into #372 for a later focused accessibility pass. This keeps the signal while reducing stale one-off issue noise.

shanselman avatar May 18 '26 00:05 shanselman