Skip to content

fix(a11y): Don't feed semantic scroll echoes back to ScrollViewer - #24597

Open
MartinZikmund wants to merge 4 commits into
masterfrom
dev/mazi/flaky-wasm-focus
Open

MartinZikmund wants to merge 4 commits into
masterfrom
dev/mazi/flaky-wasm-focus

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

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:

test failed in last 30 master builds
Given_InputPane.When_OccludedRect_Set_Then_Focused_TextBox_Scrolled_Into_View 16
Given_FrameworkElement_EffectiveViewport.EVP_When_NestedSV 12
Given_InputManager.When_DirectManipulationMixedWithUIElementManipulation_Then_TopMostWinsAndChainingWorks 10

Mechanism.

  1. The Windows_UI_Xaml_Automation tests run early in the shard and enable accessibility, which stays on for the rest of the run.
  2. From then on, every offset change goes through ScrollViewerAutomationPeer, then UpdateNativeScrollOffsets, which sets scrollTop/scrollLeft on the ScrollContentPresenter's semantic <div overflow:scroll>.
  3. That div's scroll range comes from its semantic children, not the XAML extent, so the browser clamps or rounds the value and fires scroll.
  4. The listener in Accessibility.ts forwarded that event unconditionally to WebAssemblyAccessibility.OnScroll, which calls ScrollContentPresenter.Set(clamped) and pulls the ScrollViewer back.

Fix (Accessibility.ts only): updateNativeScrollOffsets records 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-browserwasm Release:

  • The new test Given_AccessibleScrollViewer.When_ChangeView_Then_Offset_Is_Not_Reverted_By_Semantic_Scroller fails without the fix (expected 900, got 507) and passes with it.
  • Poisoned order (one accessibility-enabling test followed by the trio): 3/3 fail before, all pass after. The victims alone pass either way.
  • Full local shard 0 (1994 tests): the trio fails before the fix and passes after, with zero retries.
  • All 262 Windows_UI_Xaml_Automation tests plus the four victims pass with the fix.
  • CI on this PR: shard 0 is clean (the trio passed). 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 ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_01WHHcu5U9N25wvKGNFCrpJm

@github-actions github-actions Bot added the platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform label Sep 23, 2026
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 2s —— View job


Review complete

  • Gather context (PR diff, changed files)
  • Review Accessibility.ts changes against AGENTS.md rules
  • Review new runtime test
  • Post inline findings
  • Post summary

Verdict: ship — solid, well-reasoned root-cause fix with 2 minor/non-blocking nits posted inline.

Summary: The isScrollEcho/syncedScrollOffsets heuristic correctly distinguishes genuine user/AT scrolls from the browser echoing our own updateNativeScrollOffsets push (exact match, or a clamp-from-beyond-range case for when the semantic children's extent shrinks between the push and the async scroll event). I traced the per-axis AND logic, the WeakMap lifecycle (fresh elements per handle, no pooling, so no stale-key risk), and the hidden/disconnected guard — didn't find a correctness gap; a partial-axis genuine scroll (e.g. vertical-only movement) is still forwarded correctly because both axes must independently look like an echo. The fix is properly scoped to the interop boundary (Accessibility.ts) and the PR is transparent that the underlying semantic-scroller geometry mismatch is a separate follow-up, not silently left unfixed.

Both findings are non-blocking:

  1. Missing [GitHubWorkItem] annotation on the new regression test per runtime-tests.md convention.
  2. The new test's fixed 5×50ms settle loop is timing- rather than condition-based — flagged as a theoretical slow-CI risk for the negative assertion, not a request to block.

No SOLID/DI, async-void, DependencyProperty, or platform-suffix concerns apply here (TS interop file + a runtime test only). No new warnings or <NoWarn> growth. Commit messages/PR title follow Conventional Commits.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 235236 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • DisplayInformation.png-dark
    • ContextRequested.png-dark
    • ContextRequested.png
    • Focus_FocusVisual_Properties.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • DropDownButtonPage.png-dark
  • skia-windows-screenshots: 2310 changed over 2442

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AppBarButtonTest.png
    • AppBarToggleButtonTest.png-dark
    • ApplicationViewSpanningRectsPage.png-dark
    • AppWindowTitleBar Properties.png
    • Attributed_text_FontSize_Changing.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutomationPropertiesExtensions_Role.png
    • AutoSizedPathCentered.png-dark
    • AutoSizedPathCentered.png
    • AutoSuggestBox_SoftKeboard.png-dark
    • AutoSuggestBox_SoftKeboard.png
    • Basics_Automated.png-dark
    • Basics_Automated.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Uno_Web.Http.CookieManagerTests
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 3m 1s —— View job


Review complete

  • Gather context (diff, changed files)
  • Review Accessibility.ts changes against AGENTS.md rules
  • Review new runtime test
  • Post inline findings
  • Post summary

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 — [GitHubWorkItem("https://github.com/unoplatform/uno/issues/24596")] was added to When_ChangeView_Then_Offset_Is_Not_Reverted_By_Semantic_Scroller, and the fixed settle loop was widened from 5×50ms to 10×50ms with a comment explaining why it's a settle-wait rather than a WaitFor (the assertion is negative, so there's no target value to poll for).

Re-verification of the core fix (Accessibility.ts): re-traced isScrollEcho/syncedScrollOffsets against the specific failure mode described in the PR — including the case where the semantic children's extent shrinks between the updateNativeScrollOffsets push and the async scroll event, which can clamp the read-back value all the way down to a new (possibly zero) max. Confirmed this is still caught correctly: maxTop/maxLeft are recomputed live from current scrollWidth/Height/clientWidth/Height at echo-check time, not cached from the push, so a post-push clamp to any reduced max (including 0) still satisfies value == max && syncedValue > max. No asymmetric gap found. Per-axis independence (both axes must independently look like an echo) still holds under inspection, so a genuine single-axis scroll is forwarded correctly. WeakMap usage is consistent with existing precedent in this same TS folder (BrowserNativeElementHostingExtension.ts), and entries are naturally reclaimed on element GC (no manual cleanup needed on removeSemanticElement/hideSemanticElement).

Cross-cutting: no SOLID/DI, async-void, DependencyProperty, or platform-suffix concerns (TS interop file + a runtime test only). No new warnings or <NoWarn> growth. Commit messages follow Conventional Commits. The unrelated screenshot-diff bot comment on this PR (~2300 Windows / 57 Linux / 11 WASM snapshot changes) looks environmental/pre-existing rather than caused by this diff, since the change touches only TS scroll-echo filtering and a new test — worth a quick sanity check by the author but not a review blocker for this diff.
· branch dev/mazi/flaky-wasm-focus

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 235431 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContextRequested.png-dark
    • ContextRequested.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • DisplayInformation.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DropDownButtonPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • DropDownButtonPage.png
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
  • skia-windows-screenshots: 2310 changed over 2498

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppBarButtonTest.png
    • ApplicationViewSizing.png
    • AppWindowPresenters.png
    • Arrange_Performance01.png
    • Attributed_text_Supserscript.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_Name.png-dark
    • AutoSizedTopLeft.png
    • AutoSuggestBox_Keyboard.png
    • AutoSuggestBox_Reason.png-dark
    • BasicEnability.png-dark
    • BasicEnability.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
    • BorderVersusPanelClipping.png-dark
    • BorderVersusPanelClipping.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@morning4coffe-dev morning4coffe-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Detecting and ignoring browser scroll echoes on WASM prevents programmatic scrolls from being reverted.

@mergify

mergify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request

@MartinZikmund
MartinZikmund force-pushed the dev/mazi/flaky-wasm-focus branch from 4ecf4b8 to 1ccc9f5 Compare September 25, 2026 22:21
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 12s —— View job


Review complete

  • Gather context (diff vs origin/master, changed files)
  • Review Accessibility.ts changes against AGENTS.md rules
  • Review runtime test changes
  • Post inline findings (none — no new issues)
  • Post summary

Verdict: ship — no new findings.

What I checked: the diff at HEAD (1ccc9f52) is unchanged from the state already reviewed twice on this PR and approved by @morning4coffe-dev. I independently re-read both files fresh rather than trusting prior notes:

  • Accessibility.ts: re-traced isScrollEcho/syncedScrollOffsets end-to-end — the exact-match branch, the clamp-from-beyond-range branch (value == max && syncedValue > max, with maxLeft/maxTop recomputed live from current scrollWidth/Height/clientWidth/Height rather than cached), the disconnected/zero-size guard, and the per-axis independence (both axes must independently look like an echo, so a genuine single-axis scroll still forwards). No correctness gap found. The function mutates syncedScrollOffsets as a side effect of a isXxx-named predicate, which is a minor readability wrinkle but not incorrect — not worth a blocking comment given it's a small, well-contained interop file.
  • Runtime test: both nits from the earlier pass are resolved — [GitHubWorkItem("https://github.com/unoplatform/uno/issues/24596")] is present, and the fixed settle loop (now 10×50ms) has a comment explaining it's an intentional settle-wait rather than a WaitFor, since the assertion is negative.

Cross-cutting: no SOLID/DI, async-void, DependencyProperty, or platform-suffix concerns (TS interop file + a runtime test only). No new warnings or <NoWarn> growth. Tabs/braces style is consistent with the surrounding file. Commit messages and PR title follow Conventional Commits. The screenshot-diff bot comments on this PR (~2300 Windows / 57 Linux / 11 WASM) are unrelated to this diff's scope (TS scroll-echo filtering + a new test) and don't overlap with any of the changed area.
· branch dev/mazi/flaky-wasm-focus

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 235797 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DisplayInformation.png-dark
    • ContextRequested.png-dark
    • ContextRequested.png
    • Focus_FocusVisual_Properties.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
  • skia-windows-screenshots: 2310 changed over 2500

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AppBarButtonTest.png
    • AppBarToggleButtonTest.png
    • AppBar_KeyBoard.png-dark
    • AppBar_KeyBoard.png
    • ApplicationViewMode.png-dark
    • ApplicationViewMode.png
    • AppWindowClosing.png
    • AppWindowPositionAndSize.png
    • AppWindowPresenters.png-dark
    • Arrange_Performance01.png-dark
    • Arrange_Performance01.png
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutoSizedPathCentered.png
    • AutoSizedTopLeft.png-dark
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Uno_Web.Http.CookieManagerTests
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 34s —— View job


Review complete

  • Gather context (diff vs origin/master, changed files)
  • Review Accessibility.ts changes against AGENTS.md rules
  • Review runtime test changes
  • Post inline findings (none — no new issues)
  • Post summary

Verdict: ship — no new findings.

What changed since the last review: nothing in content. git diff origin/master...HEAD at current HEAD (48f7ab51) is byte-identical to the state reviewed on 2026-09-25 (then at 1ccc9f52) — same 87-line diff across the same two files. The commit hashes moved because the branch was rebased onto a newer master, not because any code changed.

Re-confirmed on this pass: isScrollEcho/syncedScrollOffsets in Accessibility.ts still correctly distinguishes genuine user/AT scrolls from echoes of our own updateNativeScrollOffsets push — exact-match branch, the clamp-from-beyond-range branch (maxLeft/maxTop recomputed live, not cached, so a post-push extent shrink is still caught), the disconnected/zero-size guard, and per-axis independence (both axes must independently look like an echo, so a genuine single-axis scroll still forwards). The runtime test carries [GitHubWorkItem("https://github.com/unoplatform/uno/issues/24596")] and the 10×50ms settle loop has a comment explaining why it's a fixed wait rather than WaitFor (negative assertion, nothing to poll).

Cross-cutting: no SOLID/DI, async-void, DependencyProperty, or platform-suffix concerns (TS interop file + a runtime test only). No new warnings or <NoWarn> growth. Commit messages and PR title follow Conventional Commits. The screenshot-diff bot comments on this PR (~2300 Windows / 57 Linux / 11 WASM) are unrelated to this diff's scope and don't overlap with the changed files.
· branch dev/mazi/flaky-wasm-focus

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity · 1 Medium severity · 1 Low severity

Open (3)
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.ts to drop semantic scroller scroll events that are echoes of our own offset pushes (or come from disconnected/hidden elements).
  • Record the browser-kept scroll offsets after updateNativeScrollOffsets to detect echoes precisely.
  • Add a WASM runtime test to validate that ChangeView offsets 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.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237169 found UI Test snapshots differences: skia-linux-screenshots: 119, skia-windows-screenshots: 143

Details
  • skia-linux-screenshots: 119 changed over 2454

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • Buttons.png-dark
    • Buttons.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • DisplayInformation.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
  • skia-windows-screenshots: 143 changed over 2456

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • Buttons.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DeferLoadStrategyWithTemplateBinding.png-dark
    • DeferLoadStrategyWithTemplateBinding.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Grid_Multi_Column_Span.png-dark
    • Grid_Multi_Column_Span.png
    • Grid_RowSpan_Auto_WithText.png-dark
    • Grid_RowSpan_Auto_WithText.png
    • ImageBrush_Formats.png-dark
    • ImageBrush_Formats.png
    • Examples.png
    • Gamepad_CurrentReading.png-dark
    • Grid_left_column_Auto.png-dark

Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:46
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/flaky-wasm-focus branch from 48f7ab5 to c1068db Compare October 6, 2026 09:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 13s —— View job


Review complete

Verdict: ship. No new inline findings. Issues by severity: 0 blocking, 0 minor.

I reviewed the diff against origin/master (the Accessibility.ts echo filter and the new Given_AccessibleScrollViewer runtime test). It matches what earlier passes covered. This was a read-only code review. I did not build or run anything, so the runtime validation is the PR's own report, not something I confirmed.

Copilot's open comments

  • Zero-size guard (&& vs ||). I would keep &&. A scroller with only one zero dimension can still scroll genuinely on the other axis, for example an AT scroll on a wide, zero-height strip. Switching to || would drop those events. The per-axis echo check already handles the clamp and reset cases.
  • Named constant for the 1px tolerance. This is a style nit. It is used in one place next to an explanatory comment, so it is optional.
  • Settle delay in the test. The 10×50ms wait per offset is intentional. The assertion is negative, so there is nothing to poll for. The comment in the test explains this.

Cross-cutting

  • The test has [GitHubWorkItem], and the commits and title follow Conventional Commits.
  • No new warnings or NoWarn growth.
  • The screenshot-diff bot noise is unrelated to this change, which only touches TS scroll-echo filtering and one test.
  • The semantic scroller geometry follow-up is clearly called out in the PR description.
    · branch dev/mazi/flaky-wasm-focus

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237629 found UI Test snapshots differences: skia-linux-screenshots: 130, skia-windows-screenshots: 169

Details
  • skia-linux-screenshots: 130 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • CompositionPath.png-dark
    • CompositionPath.png
    • DisplayInformation.png-dark
    • AutomationProperties_AutomationId.png
    • DropDownButtonPage.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • AutomationProperties_AutomationId.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
  • skia-windows-screenshots: 169 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • DisplayInformation.png-dark
    • DeferLoadStrategyWithTemplateBinding.png-dark
    • DeferLoadStrategyWithTemplateBinding.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Examples.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png

MartinZikmund and others added 4 commits October 9, 2026 14:57
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]>
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
Copilot AI balanced review requested due to automatic review settings October 9, 2026 13:24
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/flaky-wasm-focus branch from c1068db to 17d7cf5 Compare October 9, 2026 13:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 12s —— View job


Review complete

Verdict: ship. No blocking findings. I posted no inline comments.

What changed since the last pass: the latest commit takes up both Copilot nits in Accessibility.ts.

  • The 1px tolerance is now the named constant SCROLL_ECHO_TOLERANCE_PX.
  • The disconnected/zero-size guard now uses ||, so an element with either clientWidth or clientHeight equal to 0 counts as an echo.

Notes

  • Zero-size guard (minor, non-blocking): the earlier review argued for &&, so the switch to || is a small behavior change. A scroller with one zero dimension can no longer forward genuine scrolls on its other axis. That case is very unlikely for a real semantic scroller, and || is arguably the safer choice here, since a collapsed element gives unreliable offsets. I'm fine with either.
  • Echo logic: the per-axis echo check, the clamp-from-beyond-range branch and the live max recomputation are unchanged and still correct.
  • Test: the runtime test keeps [GitHubWorkItem] and the commented settle wait.

Cross-cutting

  • Validation: this was a read-only review. I did not build or run anything.
  • Screenshot diffs: the screenshot-diff bot noise doesn't overlap with this change, which only touches TS scroll filtering and one test.
  • Follow-up: the semantic scroller geometry issue is still tracked as a follow-up, as the PR description states.
    · branch dev/mazi/flaky-wasm-focus

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238539 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1129

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • DropDownButtonPage.png-dark
    • Focus_FocusVisual_Properties.png-dark
  • skia-windows-screenshots: 1129 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AnimatedIconPage.png
    • AutoSuggestBox_Keyboard.png-dark
    • AutoSuggestBox_Keyboard.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
    • Border_AntiAlias.png-dark
    • Border_AntiAlias.png
    • Border_CornerRadius_Gradient.png-dark
    • Border_CornerRadius_Gradient.png
    • Button_Events.png-dark
    • Button_Events.png
    • ClipboardTests.png-dark
    • CommandBar_With_Long_Sentences.png-dark
    • CommandBar_With_Long_Sentences.png
    • ContentControl_SelectorInheritance.png-dark
    • ContentControl_SelectorInheritance.png
    • AppBarButtonWithIconTest.png
    • AppWindowFeatures.png-dark
    • AutoBorderStretchwithleftmargin.png

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

Labels

platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WASM] ScrollViewer offset reverted by semantic DOM scroll echo when accessibility is enabled

5 participants