Repository navigation
fix(a11y): Don't feed semantic scroll echoes back to ScrollViewer - #24597
MartinZikmund wants to merge 4 commits into
Conversation
|
Claude finished @MartinZikmund's task in 3m 2s —— View job Review complete
Verdict: ship — solid, well-reasoned root-cause fix with 2 minor/non-blocking nits posted inline. Summary: The Both findings are non-blocking:
No SOLID/DI, async-void, DependencyProperty, or platform-suffix concerns apply here (TS interop file + a runtime test only). No new warnings or |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24597/wasm-skia-net9/index.html |
|
The build 235236 found UI Test snapshots differences: Details
|
0f2a257 to
4ecf4b8
Compare
|
Claude finished @MartinZikmund's task in 3m 1s —— View job Review complete
Verdict: ship — no new findings on this synchronize pass. What changed since the last review: both previously-flagged nits were addressed by the two follow-up commits — Re-verification of the core fix ( Cross-cutting: no SOLID/DI, async-void, |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24597/wasm-skia-net9/index.html |
|
The build 235431 found UI Test snapshots differences: Details
|
morning4coffe-dev
left a comment
There was a problem hiding this comment.
LGTM! Detecting and ignoring browser scroll echoes on WASM prevents programmatic scrolls from being reverted.
|
Tick the box to add this pull request to the merge queue (same as
|
4ecf4b8 to
1ccc9f5
Compare
|
Claude finished @MartinZikmund's task in 1m 12s —— View job Review complete
Verdict: ship — no new findings. What I checked: the diff at HEAD (
Cross-cutting: no SOLID/DI, async-void, |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24597/wasm-skia-net9/index.html |
|
The build 235797 found UI Test snapshots differences: Details
|
1ccc9f5 to
48f7ab5
Compare
|
Claude finished @MartinZikmund's task in 34s —— View job Review complete
Verdict: ship — no new findings. What changed since the last review: nothing in content. Re-confirmed on this pass: Cross-cutting: no SOLID/DI, async-void, |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (3)
The 'zero-size element' guard only triggers when both clientWidth and clientHeight are 0. If… · New The1pixel tolerance is a behavior-defining constant used for echo detection, but it’s currently… · New This introduces a fixed ~500ms settle delay per offset (and ~1.5s for the test) which can inflate… · New
What changed in this PR
Fixes a WASM+a11y feedback loop where programmatic ScrollViewer.ChangeView updates were clamped/rounded by the semantic DOM scroller and then echoed back into managed code, reverting offsets and causing shard-0 runtime test flakes.
Changes:
- Add filtering in
Accessibility.tsto drop semantic scrollerscrollevents that are echoes of our own offset pushes (or come from disconnected/hidden elements). - Record the browser-kept scroll offsets after
updateNativeScrollOffsetsto detect echoes precisely. - Add a WASM runtime test to validate that
ChangeViewoffsets are not reverted by the semantic scroller.
| File | Description |
|---|---|
| src/Uno.UI.RuntimeTests/Microsoft/UI/Xaml/Automation/Given_AccessibleScrollViewer.cs | Adds a regression test covering the offset-revert scenario with accessibility enabled on WASM. |
| src/Uno.UI.Runtime.Skia.WebAssembly.Browser/ts/Runtime/Accessibility.ts | Tracks last synced DOM offsets and ignores echoed/clamped scroll events so they don’t feed back into managed scrolling. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24597/wasm-skia-net9/index.html |
|
The build 237169 found UI Test snapshots differences: Details
|
48f7ab5 to
c1068db
Compare
|
Claude finished @MartinZikmund's task in 13s —— View job Review completeVerdict: ship. No new inline findings. Issues by severity: 0 blocking, 0 minor. I reviewed the diff against Copilot's open comments
Cross-cutting
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24597/wasm-skia-net9/index.html |
|
The build 237629 found UI Test snapshots differences: Details
|
On WASM with accessibility enabled, each ScrollViewer offset change is mirrored to its semantic scroller's scrollTop/Left. The browser clamps and rounds that to the range spanned by the semantic children (which does not match the XAML extent), and the resulting scroll event was forwarded to the ScrollContentPresenter as a user scroll, dragging the ScrollViewer back. Only forward scroll events that did not originate from our own updates, a clamp, or the element being hidden. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Treat a semantic scroller with either dimension at zero as an echo, name the one-pixel tolerance, and shorten the test settle window. Review feedback addressed 2026-10-09. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NHPnucPE4WuxBEhL1RJG2T
c1068db to
17d7cf5
Compare
|
Claude finished @MartinZikmund's task in 12s —— View job Review completeVerdict: ship. No blocking findings. I posted no inline comments. What changed since the last pass: the latest commit takes up both Copilot nits in
Notes
Cross-cutting
|
|
The build 238539 found UI Test snapshots differences: Details
|



GitHub Issue: closes #24596
PR Type:
🐞 Bugfix
What changed? 🚀
On WebAssembly with accessibility enabled, programmatic ScrollViewer scrolls were dragged back to a smaller offset. This is also the root cause of the most frequent WASM runtime-test flakes on master, all in shard 0:
Given_InputPane.When_OccludedRect_Set_Then_Focused_TextBox_Scrolled_Into_ViewGiven_FrameworkElement_EffectiveViewport.EVP_When_NestedSVGiven_InputManager.When_DirectManipulationMixedWithUIElementManipulation_Then_TopMostWinsAndChainingWorksMechanism.
Windows_UI_Xaml_Automationtests run early in the shard and enable accessibility, which stays on for the rest of the run.ScrollViewerAutomationPeer, thenUpdateNativeScrollOffsets, which setsscrollTop/scrollLefton the ScrollContentPresenter's semantic<div overflow:scroll>.scroll.Accessibility.tsforwarded that event unconditionally toWebAssemblyAccessibility.OnScroll, which callsScrollContentPresenter.Set(clamped)and pulls the ScrollViewer back.Fix (
Accessibility.tsonly):updateNativeScrollOffsetsrecords the offsets the browser actually kept. The scroll listener then drops events that echo our own push (within 1px), clamp to the end from beyond the range, or come from a disconnected or zero-size element. Genuine user and AT scrolls are still forwarded.Not addressed here (follow-up): the semantic scroller's geometry is still off. Semantic children are positioned with
TotalMatrix, which already includes the scroll offset, so they get shifted twice, and the DOM range doesn't match the XAML extent. An AT-initiated DOM scroll therefore still maps to an imprecise XAML offset. The proper fix is content-coordinate positioning plus an extent sizer.Validation
All Runtime, local headless Chrome,
net11.0-browserwasmRelease:Given_AccessibleScrollViewer.When_ChangeView_Then_Offset_Is_Not_Reverted_By_Semantic_Scrollerfails without the fix (expected 900, got 507) and passes with it.Windows_UI_Xaml_Automationtests plus the four victims pass with the fix.Given_TextBox.When_GotFocus_BringIntoView(shard 3) still failed, so despite a similar signature it is not this mechanism and is tracked separately.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01WHHcu5U9N25wvKGNFCrpJm