Repository navigation
fix(wasm-a11y): Allow disabling accessibility again - #24636
Conversation
EnableAccessibility had no counterpart, so the semantic DOM, focus sync, native-focus suppression and live regions stayed on for the rest of the app. DisableAccessibility tears all of it down and brings the enable button back, so it can be turned on again. The ItemsRepeater, ListView and ContentDialog handlers are now detachable so a re-enable does not subscribe them twice. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Da9FjW3KpXk99Zo4YyViTE
The accessibility tests left it on for every later test in the WASM app, slowing them down and making a TextBox focus bounce through the semantic DOM. Each a11y test class now disables it in its cleanup, and new tests cover disabling and re-enabling. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Da9FjW3KpXk99Zo4YyViTE
|
Claude finished @MartinZikmund's task in 4m 53s —— View job Review complete ✅Todo list
Verdict: ship — no inline findings were posted; nothing rose to a level that blocks merge. What I verified:
Minor, non-blocking observation: the |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24636/wasm-skia-net9/index.html |
morning4coffe-dev
left a comment
There was a problem hiding this comment.
LGTM! Allowing accessibility to be cleanly disabled between tests prevents semantic DOM pollution across WASM shards.
|
The build 235500 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
GitHub Issue: closes #24635
PR Type:
🐞 Bugfix
What changed? 🚀
Skia WebAssembly accessibility could only be turned on. Once a
Given_Accessible*/Given_WasmAria*test enabled it, it stayed on for every later test in that WASM app. That made those tests slower (the semantic DOM follows every visual, focus and scroll change) and changed focus behavior: focusing a TextBox bounced Focused → Normal → Focused, which is what made the editable-ComboBox dark-theme tests flaky in WASM shard 1 (see #24600 / #24601).Product (
Uno.UI.Runtime.Skia.WebAssembly.Browser)WebAssemblyAccessibility.DisableAccessibility()(JS-exported, internal type), the counterpart ofEnableAccessibility(). It unhooks FocusDeparting, focus sync, the IsFocusable callback and live regions, restores native focus, deactivates modal focus traps, disposes the virtualized/ComboBox regions, clears the semantic maps and pending updates, then clears the semantic DOM, focus sentinels and live-region elements and brings the "Enable accessibility" button back.Accessibility.disableAccessibility()exposes it to JS for the runtime tests.Tests
WasmSemanticDomHelper.DisableAccessibility()in its[TestCleanup]. The helper does nothing outside the browser.Given_WasmAccessibilityLifecycle: the semantic DOM is removed on disable, a TextBox focus no longer bounces after disabling, and re-enabling rebuilds the tree without duplicating live regions or sentinels.Validation
All runs on Skia WebAssembly (headless Chrome,
net11.0-browserwasm, Release):Given_WasmAccessibilityLifecycle(3 tests)Given_AccessibleTextBox, then the two editable-ComboBox dark-theme tests (master's binding code, without #24601)Windows_UI_Xaml_Automationnamespace + the ComboBox pairSo this fixes the CI flake on its own, independently of #24601, which fixes the underlying setter bug.
PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01Da9FjW3KpXk99Zo4YyViTE