Skip to content

feat: add Accessibility Insights CI tests using Axe.Windows - #923

Merged
steipete merged 2 commits into
openclaw:mainfrom
karkarl:karkarl-add-accessibility-ci-tests
Jul 6, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
karkarl:karkarl-add-accessibility-ci-tests

Conversation

@karkarl

@karkarl karkarl commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add a blocking Windows accessibility gate that launches the real OpenClaw.Tray.WinUI.exe process and scans all 18 native pages with Axe.Windows, including the FunctionalUI Chat timeline and composer.

Thanks @karkarl for the initial Axe integration.

What changed

  • Launch a separate packaged-app build with an isolated OPENCLAW_TRAY_DATA_DIR; use the real single-instance IPC path for page navigation.
  • Wait for a page-specific UI Automation marker before every scan, preventing a navigation failure from scanning the previous page.
  • Mount deterministic native Chat data during isolated accessibility runs, including user/assistant messages and an enabled real composer.
  • Upgrade Axe.Windows to 2.4.2 and remove the vulnerable transitive package suppression.
  • Make the accessibility workflow blocking; keep the Markdown summary and TRX artifact publication under always().
  • Add stable automation metadata and localized accessible names for page headings, Chat selectors, refresh/clear actions, Sandbox scope, Voice controls, the Config splitter, and notification items.
  • Keep only the global WinUI framework exclusions plus one scoped ConfigPage exclusion for the inaccessible CommunityToolkit internal SizerBase peer. The public splitter peer is named and exposed correctly.

Why the original green run was insufficient

The original workflow run was green only because its accessibility step used continue-on-error. Its test job had all 17 scans fail during synthetic in-process page construction with XamlParseException; Chat was excluded. This revision removes the soft-fail path and exercises the actual app process.

Validation

Current-head Windows 11 ARM64 Parallels VM:

  • dotnet build tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-arm64 --no-restore: 0 warnings, 0 errors.
  • Real-process Axe suite: 18/18 passed in 32.8 seconds, including native Chat with ChatComposerInput inside the mounted FunctionalUI composer.
  • Full UI suite: 94/94 passed.
  • build.ps1: Shared 2691 passed / 31 skipped; Tray 1532 passed; all projects built successfully.
  • The test output contains the adjacent app executable and PRI resources, and the scanner launches that executable rather than constructing page objects in the test process.

Review

AutoReview identified two valid gaps in the initial rewrite: native Chat coverage and positive proof that each deep link reached its target. Both were fixed. A later pass caught that Chat still rendered only its disconnected placeholder; the deterministic provider and real composer marker fixed that. Final review after validation and localization corrections: no accepted or actionable findings.

@clawsweeper

clawsweeper Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 9:31 PM ET / 01:31 UTC.

Summary
The PR adds Axe.Windows-based WinUI accessibility scans to CI, launches an isolated real tray process for the scans, and adds accessibility metadata to several WinUI pages and resources.

Reproducibility: yes. from source inspection: the workflow summary only checks the step outcome and always calls failures WCAG violations, while the new fixture has several pre-scan failure paths. I did not run the Windows-only UI tests in this read-only review.

Review metrics: 3 noteworthy metrics.

  • Diff surface: 31 files changed, +649/-16. The PR is mostly tests and accessibility metadata, but it also touches CI and App startup behavior that affect validation reliability.
  • CI behavior: 1 UI test command filtered, 1 new accessibility step added. Maintainers should review the new split between ordinary UI tests and the dedicated Axe.Windows lane before merge.
  • Test dependency: 1 PackageReference added. Axe.Windows is test-scoped, but it still changes the UI test project's dependency and audit surface.

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:

  • [P1] Add current-head redacted output or a linked CI artifact showing Category=Accessibility scanned live pages and either passed or produced representative Axe findings.
  • Change the GitHub Actions summary to distinguish harness failure from WCAG violations.
  • Update the PR body so its validation and architecture text matches the current blocking Axe.Windows 2.4.2 implementation.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body has stale validation text and no redacted current-head terminal, CI, log, or artifact output proving the blocking Axe.Windows step scanned live pages; screenshots, terminal output, copied logs, or linked CI artifacts are acceptable after redacting private data, and updating the PR body should trigger a fresh ClawSweeper review or a maintainer can comment @clawsweeper 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 current PR body does not yet provide redacted current-head output proving the new blocking accessibility step actually scanned live pages.
  • [P1] The workflow summary can still send maintainers toward WCAG fixes when the failing condition is a harness, startup, navigation, or scanner failure.
  • [P1] The current CI run for head 470ed9b was still in progress during review, so the final accessibility-step result was not available.

Maintainer options:

  1. Fix the CI signal before merge (recommended)
    Update the accessibility summary or test wrapper so harness failures, accessibility violations, and clean passes are reported as distinct outcomes, then add current-head scan proof.
  2. Accept the current summary risk
    Maintainers could merge with the blocking step as-is, but future harness failures may still be summarized as WCAG violations and waste remediation time.
  3. Pause until proof completes
    If the current CI run cannot show real page scans, pause the PR until the harness can be proven on Windows with useful logs or artifacts.

Next step before merge

  • [P1] Contributor or maintainer follow-up is needed because real behavior proof cannot be supplied by an automated repair worker, even though the remaining code fix is narrow.

Security
Cleared: The current head removes the broad NU1903 downgrade and adds only a test-scoped Axe.Windows dependency; I found no concrete security or supply-chain regression.

Review findings

  • [P2] Distinguish harness failures from violations — .github/workflows/ci.yml:299-302
Review details

Best possible solution:

Land a blocking real-process Axe.Windows lane only after the failure summary separates harness failures from WCAG violations and the PR body includes current-head scan output from CI or a local Windows run.

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

Yes from source inspection: the workflow summary only checks the step outcome and always calls failures WCAG violations, while the new fixture has several pre-scan failure paths. I did not run the Windows-only UI tests in this read-only review.

Is this the best way to solve the issue?

No, not yet: the real-process blocking scan direction is maintainable, but the CI summary and proof package need to show whether failures are harness errors or actual Axe findings.

Full review comments:

  • [P2] Distinguish harness failures from violations — .github/workflows/ci.yml:299-302
    This summary runs for any failed accessibility test step, but failures can come from the new fixture before Axe reports WCAG results, such as a missing copied executable, startup timeout, deep-link timeout, page-marker timeout, scanner exception, or app crash. Please report a separate harness-failed state instead of always telling maintainers that Axe found accessibility violations.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.87

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority accessibility/CI improvement with limited product blast radius, but it needs proof and a focused CI signal fix before merge.
  • merge-risk: 🚨 automation: The PR changes CI test routing and can misclassify non-WCAG harness failures as accessibility violations in the GitHub Actions summary.
  • 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 has stale validation text and no redacted current-head terminal, CI, log, or artifact output proving the blocking Axe.Windows step scanned live pages; screenshots, terminal output, copied logs, or linked CI artifacts are acceptable after redacting private data, and updating the PR body should trigger a fresh ClawSweeper review or a maintainer can comment @clawsweeper 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 read: AGENTS.md was read fully; its UI/PR proof guidance applies because this PR changes WinUI accessibility behavior and CI validation. (AGENTS.md:49, 6045c2d00e1f)
  • Proof skill read: The OpenClaw proof skill requires current-head real behavior proof in PR proof packages, such as copied live output, screenshots, logs, or linked artifacts. (.agents/skills/openclaw-proof-validation/SKILL.md:72, 6045c2d00e1f)
  • Prior maintainer-context comment: The visible review discussion says the direction is valuable but calls out that harness failures must be distinguished from WCAG violations and current-head proof is needed.
  • Current head removes previous hard blockers: The current PR workflow makes the accessibility step blocking, the test project no longer downgrades NU1903, and the scan harness launches the real tray process instead of constructing pages inside the lightweight UI fixture. (tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs:54, 470ed9b44c29)
  • Remaining CI summary defect: The failure summary still reports any accessibility test failure as WCAG violations, even though fixture startup, missing executable, navigation timeout, or scanner errors can fail before Axe produces accessibility findings. (.github/workflows/ci.yml:299, 470ed9b44c29)
  • Harness failure modes exist outside WCAG: The new fixture can fail before scanning through FileNotFoundException, startup timeout, deep-link timeout, page-marker timeout, or unexpected process exit, so the workflow summary needs a harness-failed state. (tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.cs:31, 470ed9b44c29)

Likely related people:

  • shanselman: Blame and log history tie the existing Windows UI test workflow, UI test project, and fixture baseline to commit 4166e0f; the PR discussion also references Scott's maintainer feedback on this exact accessibility CI path. (role: UI test and CI baseline contributor; confidence: high; commits: 4166e0fd63f8; files: .github/workflows/ci.yml, tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj, tests/OpenClaw.Tray.UITests/UIThreadFixture.cs)
  • karkarl: The merged accessibility remediation on current main is authored by karkarl and is the related WCAG fix set that this PR's Axe scans are intended to enforce. (role: recent accessibility contributor; confidence: high; commits: 6045c2d00e1f; files: src/OpenClaw.Tray.WinUI/Pages, src/OpenClaw.Tray.WinUI/Strings)
  • steipete: Recent main history touches App and onboarding/startup behavior, and the latest PR repair commit is by steipete, making them a likely follow-up owner for the real-process harness shape. (role: recent adjacent tray startup contributor; confidence: medium; commits: adcb4c378f90, 470ed9b44c29; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, tests/OpenClaw.Tray.UITests/AccessibilityAppFixture.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-02T23:16:24.023Z sha 86570be :: needs real behavior proof before merge. :: [P1] Host pages with the real app context | [P2] Keep high-severity NuGet audit as an error

@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. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 2, 2026
@shanselman

Copy link
Copy Markdown
Collaborator

Hi Karen — bot review with Scott's maintainer feedback included. This is another good direction: automated accessibility scans would be valuable. The current PR cannot merge yet because the CI step is not producing useful accessibility signal.

The key issue: the new accessibility step is failing, but CI stays green because of continue-on-error. I checked the PR's test job log. The Run Accessibility Tests (Axe.Windows) step ran, but all 17 accessibility tests failed with Microsoft.UI.Xaml.Markup.XamlParseException : XAML parsing failed. The job still reported success because the step is soft-fail. That means the PR currently proves the harness is broken, not that Axe successfully scanned the app.

Other issues to fix while repairing the harness:

  1. The summary text says "Axe.Windows scans found WCAG violations" even when the failure is a harness/XAML exception. We should distinguish harness failures from real accessibility violations, otherwise maintainers may chase the wrong thing.

  2. continue-on-error is okay only after the harness is known-good. A temporary non-blocking lane can be acceptable while known WCAG issues are remediated, but harness failures should not be hidden as green CI.

  3. The scanner host needs to load pages in a production-like context. Several app pages assume the real tray app/resources/lifecycle. Instantiating them directly in the lightweight UI test fixture appears to be causing XAML parse/lifecycle failures before Axe can scan.

  4. The broad NU1903 downgrade weakens the UI test project's audit posture. If Axe.Windows pulls in a vulnerable transitive package, please pin a patched transitive dependency if possible or make the exception as narrow and documented as possible so future high-severity advisories still fail.

  5. The ConnectionPage NameNotNull exclusion should be removed or narrowed once fix: resolve WCAG accessibility violations across all app pages #921 lands. Otherwise the test can mask regressions in the exact class of issue fix: resolve WCAG accessibility violations across all app pages #921 is trying to fix.

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

Please repair PR #923 for OpenClaw Axe.Windows accessibility CI.

Requirements:
1. Reproduce the current CI behavior by running `dotnet test tests\OpenClaw.Tray.UITests -c Debug -r win-x64 --filter Category=Accessibility`. Confirm the 17 XAML parse failures.
2. Fix the accessibility test host so pages load successfully before Axe scans. Use a production-like app/resource/lifecycle context, or narrow the scanned surface to pages that can be hosted correctly. Do not count constructor/XAML parse failures as WCAG violations.
3. Change CI behavior so harness failures fail the job. If accessibility rule violations are intentionally soft-fail during adoption, split harness failure from accessibility findings and only soft-fail the latter.
4. Improve the step summary to report one of: harness failed, accessibility violations found, or accessibility scans passed.
5. Remove or narrow `continue-on-error` once the harness is fixed, or document a tracked follow-up with a clear removal condition.
6. Resolve or narrowly document the `NU1903` advisory exception; prefer patched package pins over broad WarningsNotAsErrors.
7. Remove/narrow the ConnectionPage `NameNotNull` exclusion after #921 is merged.
8. Add current-head PR proof showing the accessibility test step actually scans live pages. Include log output with test counts and representative Axe findings or a clean pass.
9. Run .\build.ps1, Shared tests, Tray tests, and the Tray UI accessibility filter locally or via CI.

This would be a great CI improvement once the harness produces real signal. Right now, though, the green check is misleading because the new tests are failing underneath it.

karkarl and others added 2 commits July 6, 2026 01:28
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]>
@steipete
steipete force-pushed the karkarl-add-accessibility-ci-tests branch from 86570be to 470ed9b Compare July 6, 2026 01:27
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednuget/​axe.windows@​2.4.23810090100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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