Skip to content

fix: resolve WCAG accessibility violations across all app pages - #921

Merged
steipete merged 2 commits into
openclaw:mainfrom
karkarl:karkarl-accessibility-scan-results
Jul 6, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
karkarl:karkarl-accessibility-scan-results

Conversation

@karkarl

@karkarl karkarl commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

A programmatic UI Automation accessibility scan found missing names on interactive controls and duplicate announcements from decorative navigation icons. Screen reader users could not reliably identify several buttons and combo boxes or navigate the sidebar.

Approach

  • Give the Voice, Sandbox, Permissions, Settings, Connection, and main navigation controls useful accessible names.
  • Back every new static accessible name with x:Uid resources in all five supported locales instead of hard-coded English.
  • Keep dynamic gateway-card and overflow-button names tied to the gateway display name.
  • Mark the navigation ImageIcon elements as decorative so assistive technology announces the navigation item once.
  • Add regression coverage requiring every new accessibility resource to remain present and non-empty in every locale.

Validation

  • AutoReview: clean; patch correct (0.98 confidence).
  • Windows 11 ARM64 VM: full Release build passed for Shared, CLI, WinNode CLI, SetupEngine, and WinUI.
  • Windows 11 ARM64 VM: LocalizationValidationTests passed 15/15.
  • Live Windows UI Automation verified Main navigation, Notification sound, all three Sandbox preset names and folder-access combo names, Rule action, the three voice-assistant actions, and Voice language on the rendered app.
  • Exact head dd5d5e6b72ce70e1f6ad3fff824efd9f9090ddbe: Build and Test.

Notes

@clawsweeper

clawsweeper Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 8:22 PM ET / 00:22 UTC.

Summary
The branch adds localized WinUI accessibility names across several tray pages, marks static HubWindow navigation ImageIcon elements decorative, and adds a locale contract test for the new accessibility resource keys.

Reproducibility: yes. from source inspection: current main lacks the proposed accessible names on the cited controls, and the remaining high-contrast/dynamic nav icon factories create icons without Raw accessibility view. I did not run a live Accessibility Insights scan in this read-only review.

Review metrics: 1 noteworthy metric.

  • UI sweep size: 12 files: 6 WinUI/code files, 5 locale files, 1 test file. The accessibility claim spans several app pages and global navigation, so reviewers need representative accessibility-tree proof rather than build/unit counts alone.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Mark high-contrast replacement icons and dynamic agent navigation icons with AccessibilityView.Raw, preferably through a shared helper.
  • [P1] Add ## Real behavior proof with redacted current-head UIA/Narrator/Accessibility Insights output or screenshots/video showing representative named controls and skipped decorative nav icons.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body still has build/test counts but no current-head UIA/Narrator/Accessibility Insights output, screenshots/video, copied diagnostics, logs, or linked artifact showing the fixed accessibility tree; proof should be redacted before posting and updating the PR body should trigger re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The static XAML icon fix still leaves high-contrast replacement FontIcon and dynamic agent nav icon paths without Raw, so some decorative navigation glyphs may remain visible to assistive tech.
  • [P1] The PR lacks current-head accessibility-tree proof, so build and unit-test counts do not demonstrate the actual UIA/Narrator behavior required by repository policy.

Maintainer options:

  1. Decide the mitigation before merge
    Finish the narrow accessibility patch by applying Raw accessibility view through every static, replacement, and dynamic navigation icon path, then add redacted current-head UIA/Narrator or Accessibility Insights proof to the PR body.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The PR needs contributor or maintainer follow-up for real accessibility-tree proof and the remaining dynamic/high-contrast icon coverage gap; missing proof makes this unsuitable for an automated repair lane.

Security
Cleared: The diff only changes WinUI accessibility semantics, localized resource strings, and a tray test; no security or supply-chain concern was found.

Review findings

  • [P2] Mark replacement nav icons as decorative too — src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml:418
Review details

Best possible solution:

Finish the narrow accessibility patch by applying Raw accessibility view through every static, replacement, and dynamic navigation icon path, then add redacted current-head UIA/Narrator or Accessibility Insights proof to the PR body.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: current main lacks the proposed accessible names on the cited controls, and the remaining high-contrast/dynamic nav icon factories create icons without Raw accessibility view. I did not run a live Accessibility Insights scan in this read-only review.

Is this the best way to solve the issue?

No, not yet: the localization direction is now solid, but the implementation must also cover replacement and dynamic navigation icons and include current-head accessibility-tree proof before merge.

Full review comments:

  • [P2] Mark replacement nav icons as decorative too — src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml:418
    This still only marks the static XAML ImageIcon instances as Raw. In high-contrast mode SwapToFontIcons() replaces them with new FontIcon objects, and runtime agent rows use BuildAgentItemIcon(); neither code path sets AccessibilityView.Raw, so decorative navigation glyphs can still be announced. Please apply the Raw view when constructing or swapping these icons, ideally through a shared helper.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ccb680aeaefe.

Label changes

Label justifications:

  • P2: This is a normal-priority accessibility improvement across core tray UI surfaces with bounded UI semantics and resource-string blast radius.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body still has build/test counts but no current-head UIA/Narrator/Accessibility Insights output, screenshots/video, copied diagnostics, logs, or linked artifact showing the fixed accessibility tree; proof should be redacted before posting and updating the PR body should trigger re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

What I checked:

  • Repository policy applies: AGENTS.md was read fully; its UI proof guidance applies because this PR changes tray UX accessibility semantics and requires real current-head proof for UI claims. (AGENTS.md:46, ccb680aeaefe)
  • Proof skill applies: The OpenClaw proof skill requires a PR proof package with current-head real behavior evidence such as copied UI diagnostics, screenshots/video, logs, or linked artifacts for UI changes. (.agents/skills/openclaw-proof-validation/SKILL.md:57, ccb680aeaefe)
  • Current PR proof gap: The live PR body has no Real behavior proof section and no UIA/Narrator/Accessibility Insights output or media proving the fixed accessibility tree on head dd5d5e6. (dd5d5e6b72ce)
  • Localization blocker addressed: Compared with the earlier reviewed head, the latest PR head changes HubWindow's navigation name to x:Uid and adds a test requiring every new accessibility-name resource key in each locale. (tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs:358, dd5d5e6b72ce)
  • Navigation icon coverage gap remains: Current main creates replacement FontIcon instances for high-contrast navigation and dynamic agent nav icons without setting AccessibilityView.Raw, while the PR only marks static XAML ImageIcon elements. (src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs:1417, ccb680aeaefe)
  • Related accessibility CI PR is adjacent: The related Axe.Windows CI PR remains open and separately blocked; it can help future validation but does not replace the current PR's code fix or proof requirement.

Likely related people:

  • shanselman: git blame ties the high-contrast navigation icon code and saved gateway row UI baseline to commit 4166e0f, and the PR discussion carries Scott's accessibility review feedback. (role: introduced current WinUI baseline and review-context contributor; confidence: high; commits: 4166e0fd63f8; files: src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs, src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml, src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml.cs)
  • bkudiess: commit 74604ae recently touched HubWindow.xaml.cs in the same tray UI navigation/state area. (role: recent adjacent tray UI contributor; confidence: medium; commits: 74604aebafef; files: src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs)
  • steipete: the latest PR commit dd5d5e6 localizes the accessibility names and adds locale coverage after review feedback. (role: recent PR repair contributor; confidence: medium; commits: dd5d5e6b72ce; files: src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw, src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml, tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-02T22:58:15.310Z sha b164f18 :: needs real behavior proof before merge. :: [P2] Mark replacement nav icons as decorative too

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. labels Jul 2, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

Hi Karen — bot review with Scott's maintainer feedback folded in. First: thank you for this. The direction is absolutely right, and this is the kind of accessibility cleanup we want in the app. We are not at Scott's >=90% merge-confidence bar yet, but this looks very salvageable.

What is holding this one back:

  1. We need real accessibility-tree proof from the PR head. The code changes are plausible, but this repo treats UI/a11y changes as behavior changes, so build/unit tests are not enough. Please add a ## Real behavior proof section to the PR body with current-head evidence: Accessibility Insights output, Narrator/UIA output, copied diagnostics, or screenshots/video showing the fixed controls have names and decorative icons are skipped.

  2. The decorative icon fix only covers the static XAML icons. HubWindow.xaml marks the XAML ImageIcons as AccessibilityView="Raw", but the app also creates/replaces navigation icons in code paths such as high-contrast fallback and dynamic agent nav items. Those code-created/replacement icons still need the same Raw accessibility treatment, otherwise the claim "decorative nav icons are skipped" is only partially true.

  3. Most new accessible names are hardcoded English. Some are correctly localized (ConnectionPage_GatewayOptionsA11y), but many XAML names like Rule action, Sandbox action, Documents access level, Voice language, and the preset labels are hardcoded. For a screen-reader fix, localized builds should not get English-only accessible names.

Bot-ready repair prompt you can give your coding agent:

Please repair PR #921 for OpenClaw. Keep the existing accessibility fixes, but make them complete and merge-ready.

Requirements:
1. Find all navigation icons created or replaced in code, especially HubWindow high-contrast fallback icons and dynamic agent navigation icons. Ensure every decorative navigation icon, whether from XAML or code, has AutomationProperties.AccessibilityView set to Raw. Prefer a shared helper so future icon creation stays consistent.
2. Localize every new AutomationProperties.Name added by this PR. Use x:Uid/resource-backed names for XAML controls, and LocalizationHelper for code-created controls. Add the needed resource entries for en-us, fr-fr, nl-nl, zh-cn, and zh-tw.
3. Preserve the already-correct ConnectionPage gateway-options localization.
4. Add or update focused tests/source contract tests where practical to pin dynamic/high-contrast icon Raw behavior and the resource keys for the new a11y names.
5. Update the PR body with a `## Real behavior proof` section containing current-head UIA/Narrator/Accessibility Insights output or screenshots that show representative fixed controls and decorative nav icons.
6. Run the repo-required validation: .\build.ps1, Shared tests, and Tray tests.

Once those are addressed and proof is in the PR body, this should be a much easier approval path. The core idea is good; we just need the implementation and proof to cover all the paths the app actually uses.

karkarl and others added 2 commits July 6, 2026 00:51
Address HIGH and MEDIUM severity accessibility violations found via
Windows UI Automation programmatic scan (WCAG 2.1 compliance):

Voice & Audio page:
- Add AutomationProperties.Name to AssistantRefreshButton, StartButton,
  StopButton, and LanguageCombo

Sandbox page:
- Add AutomationProperties.Name to PresetLockedButton, PresetBalancedButton,
  PresetPermissiveButton with descriptive preset names
- Add AutomationProperties.Name to DocsAccessCombo, DownloadsAccessCombo,
  DesktopAccessCombo
- Add AutomationProperties.Name to UnavailablePrimaryButton

Permissions page:
- Add AutomationProperties.Name to NewRuleAction ComboBox

Settings page:
- Add AutomationProperties.Name to NotificationSoundComboBox

Connection page:
- Set AutomationProperties.Name on gateway row cards (uses DisplayName)
- Set AutomationProperties.Name on overflow menu button (Options for {name})
- Add ConnectionPage_GatewayOptionsA11y localization string (all locales)

Global navigation (HubWindow):
- Add AutomationProperties.Name to NavigationView (Main navigation)
- Mark all nav ImageIcon elements with AccessibilityView=Raw (decorative)

Fixes 14 HIGH-severity WCAG 4.1.2 violations and 8 MEDIUM-severity
WCAG 1.1.1 violations.

Co-authored-by: Copilot App <[email protected]>
@steipete
steipete force-pushed the karkarl-accessibility-scan-results branch from b164f18 to dd5d5e6 Compare July 6, 2026 00:13
@steipete
steipete merged commit 6045c2d into openclaw:main Jul 6, 2026
12 checks passed
steipete pushed a commit to karkarl/openclaw-windows-node that referenced this pull request Jul 6, 2026
Implements automated accessibility scanning modeled after the WinUI-Gallery
pattern. Each app page is instantiated in the UIThreadFixture's hidden window
and scanned via Axe.Windows.Automation against the live UIA tree for WCAG
violations.

Components added:
- AxeHelper.cs: Wraps Axe.Windows scanner with global exclusions for known
  WinUI framework bugs (same set as WinUI-Gallery) and per-page exclusion
  support. Error output includes ControlType, Name, and AutomationId for
  actionable remediation.
- AccessibilityScanTests.cs: Data-driven xUnit Theory that scans all 17 app
  pages. New pages are picked up by adding to PageTestData(). ChatPage is
  excluded (WebView2/CefSharp UIA tree crashes Axe).

CI integration (.github/workflows/ci.yml):
- Existing UI tests now exclude Category=Accessibility to avoid blocking on
  known violations while the team remediates (PR openclaw#921).
- Dedicated 'Run Accessibility Tests (Axe.Windows)' step with
  continue-on-error: true surfaces violations as a visible warning in the
  GitHub Actions summary without blocking merges.
- Step summary reports pass/fail with link to PR openclaw#921 for fixes.

The tests will initially fail until PR openclaw#921 (accessibility fixes) lands.
Remove continue-on-error once all violations are resolved.

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants