Skip to content

fix(wasm-a11y): Mirror scroll geometry in the semantic DOM (backport #25587) - #25845

Merged
agneszitte merged 2 commits into
servicing/6.8from
dev/doti/bp-25587-6.8
Oct 30, 2026
Merged

agneszitte merged 2 commits into
servicing/6.8from
dev/doti/bp-25587-6.8

Conversation

@morning4coffe-dev

Copy link
Copy Markdown
Member

GitHub Issue: backport of #25587 (closes #24867 on 6.8)

PR Type:

🐞 Bugfix

What changed? 🚀

Manual backport of #25587 to servicing/6.8. Mergify's cherry-pick can't be used: 6.8 lacks several later master refactors, so 4 files conflicted. The changes match the original PR, with these 6.8 adjustments:

  • UpdateNativeScrollOffsets keeps the 6.8 JS namespace (Uno.UI.Runtime.Skia.Accessibility).
  • ScrollContentPresenter keeps 6.8's !__CROSSRUNTIME__ && !IS_UNIT_TESTS condition on ICustomClippingElement.
  • ScrollPresenter keeps 6.8's _borderRenderer field. The InteractionTracker accessor from master's context isn't brought over.
  • The test ScrollPatternListener drops two IAutomationPeerListener members that don't exist on 6.8.

PR Checklist ✅

…25587)

Manual port to servicing/6.8. Conflicts resolved:
- JSImport namespace kept as Uno.UI.Runtime.Skia.Accessibility (6.8 naming).
- ScrollContentPresenter keeps the 6.8 `!IS_UNIT_TESTS` condition on ICustomClippingElement.
- ScrollPresenter keeps 6.8's _borderRenderer field.
- Test listener drops IAutomationPeerListener members that 6.8 doesn't have.

(cherry picked from commit eed8397)
@morning4coffe-dev morning4coffe-dev added the platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 3m 40s —— View job


Review complete ✅

Todo list

  • Gather context (PR body, diff, changed files)
  • Review C# changes (ScrollContentPresenter, ScrollPresenter, ScrollViewer, IScrollPortGeometry)
  • Review WebAssemblyAccessibility.cs + Accessibility.ts (JS interop)
  • Review uno.css changes
  • Review RuntimeTests (Given_AccessibleScrollViewer.cs)
  • Post inline findings (none met the bar — see below)
  • Post summary

Verdict: Ship

No inline findings posted — I didn't find defects introduced by this backport. This is a faithful adaptation of #25587 onto servicing/6.8, and I verified each of the three 6.8-specific adjustments called out in the description:

  • ScrollContentPresenter keeps the !__CROSSRUNTIME__ && !IS_UNIT_TESTS guard on ICustomClippingElement.
  • ScrollPresenter.Uno.cs keeps the 6.8 _borderRenderer field (#if !UNO_HAS_BORDER_VISUAL) and doesn't pull in master's InteractionTracker accessor.
  • ScrollPatternListener in the test file implements exactly the 6 members of 6.8's IAutomationPeerListener (confirmed against IAutomationPeerListener.cs), matching the "drops two members" note.
  • The JS interop keeps the 6.8 namespace (globalThis.Uno.UI.Runtime.Skia.Accessibility.updateNativeScrollOffsets), matching the [JSImport] string.

Notable correctness points verified by reading the code (not executed at runtime):

  • ScrollContentPresenter.cs's ScrollOwner getter changing from _scroller.Target to _scroller?.Target is a genuine root-cause fix, not just defensive hardening: it's required by the new IScrollContentPresenter.ScrollableWidth/Height (via Scroller?.…) being reachable before ScrollOwner is ever set — exactly the scenario the new When_ScrollContentPresenter_Has_No_Owner_Then_Semantic_Port_Created test exercises.
  • ScrollPresenter's IScrollPortGeometry.ScrollToOffsets correctly routes through the internal, non-animated ScrollToOffsets rather than the public animatable ScrollTo used previously in OnScroll — the right choice for applying a native-driven offset without queuing an async/animated view change.
  • The TS echo-suppression (scrollPortStates WeakMap) and the @property --uno-scroll-extent-*/::before CSS sizing trick are internally consistent with each other and with the new UpdateNativeScrollOffsets native signature (extent + scrollability flags).

Cross-cutting, non-blocking observation (pre-existing, outside this diff — not flagged inline since it's an unmodified line): ScrollViewer.cs line ~851, var newSize = new Size(ExtentWidth, ExtentWidth); duplicates ExtentWidth instead of using ExtentHeight. It sits right next to this PR's new automation-event code but predates this change (confirmed present on origin/servicing/6.8 already) and only affects ExtentSizeChanged event args, so it's out of scope here — worth a separate fix.

Validation labels: this was a code-review by inspection only — no build or runtime test execution was performed in this session.

Branch ·

@agneszitte
agneszitte requested review from Xiaoy312 and ajpinedam and removed request for Xiaoy312 October 30, 2026 15:33
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@agneszitte
agneszitte enabled auto-merge October 30, 2026 17:25
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 242476 has failed on Uno.UI - CI.

InteractionTracker.TryUpdatePositionWithAnimation is not implemented on
servicing/6.8, so animated ScrollView.ScrollTo throws and the test can never
pass. The feature it guards (ScrollPresenter animation echo) can't occur there.
@morning4coffe-dev

Copy link
Copy Markdown
Member Author

CI failure on Tests - WebAssembly Skia / Runtime Tests 3 (build 242476, attempts 1–8) was deterministic, not a flake. Only Given_AccessibleScrollViewer.When_ScrollView_Scroll_Animated_Then_Animation_Completes failed: animated ScrollView.ScrollTo throws NotImplementedException from InteractionTracker.TryUpdatePositionWithAnimation, which is still a generated stub on 6.8 (implemented on master by the later scroll-motion work). Removed that test from the backport in d3b0d25; everything else was green.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 1m 48s —— View job


Review complete ✅

Todo list

  • Gather context (diff vs origin/servicing/6.8, changed files)
  • Review C# changes (ScrollContentPresenter, ScrollPresenter, ScrollViewer, IScrollPortGeometry)
  • Review JS interop (WebAssemblyAccessibility.cs + Accessibility.ts)
  • Review uno.css changes
  • Review RuntimeTests (Given_AccessibleScrollViewer.cs)
  • Post inline findings (none met the bar)
  • Post summary

Verdict: Ship

No inline findings. I re-reviewed the full diff against origin/servicing/6.8 (both commits, including the latest test(a11y): Drop animated ScrollView test from 6.8 backport), cross-checking against AGENTS.md rules (platform targeting, DependencyProperty correctness, root-cause-first fixes, event conventions, test coverage, code style).

Highlights verified:

  • 6.8 adjustments match the PR description exactly: the !__CROSSRUNTIME__ && !IS_UNIT_TESTS guard on ICustomClippingElement is intact, ScrollPresenter.Uno.cs keeps the _borderRenderer field without pulling in master's InteractionTracker accessor, the JS interop keeps the 6.8 Uno.UI.Runtime.Skia.Accessibility namespace, and ScrollPatternListener implements exactly the 6 members of 6.8's IAutomationPeerListener (confirmed against the interface file).
  • Latest commit is justified, not a silent skip: it deletes (not [Ignore]s) When_ScrollView_Scroll_Animated_Then_Animation_Completes with a clear commit-message reason — InteractionTracker.TryUpdatePositionWithAnimation isn't implemented on 6.8, so the feature the test guards (animated-scroll echo suppression) can't occur on this branch.
  • Root-cause fix, not a guard: ScrollContentPresenter.ScrollOwner getter (_scroller.Target → _scroller?.Target) correctly supports the new IScrollPortGeometry.ScrollableWidth/Height being reachable before any owner is assigned — exercised by When_ScrollContentPresenter_Has_No_Owner_Then_Semantic_Port_Created.
  • ScrollToOffsets routing is correct on both sides: ScrollContentPresenter routes to the internal Set(..., disableAnimation: false) (same default as the old direct Set call), and ScrollPresenter routes to its internal non-animated ScrollToOffsets, not the public animatable ScrollTo — verified against ScrollPresenter.cs.
  • Traced the TS scrollPortStates echo-suppression and the @property --uno-scroll-extent-* / ::before CSS sizing trick — internally consistent with the new native UpdateNativeScrollOffsets signature (extent + scrollability flags).

No cross-cutting concerns beyond what was already noted in the prior review pass (the pre-existing, unmodified ExtentWidth/ExtentWidth typo at ScrollViewer.cs ~L851, out of scope for this diff).

Validation labels: code review by inspection only — no build or runtime test execution was performed in this session.

Branch ·

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@mergify

mergify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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.

@agneszitte
agneszitte merged commit 6951c2c into servicing/6.8 Oct 30, 2026
42 checks passed
@agneszitte
agneszitte deleted the dev/doti/bp-25587-6.8 branch October 30, 2026 22:43
@agneszitte

Copy link
Copy Markdown
Member

@Mergifyio backport release/stable/6.7

@mergify

mergify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

backport release/stable/6.7

✅ Backports have been created

Details

agneszitte added a commit that referenced this pull request Nov 3, 2026
…6.7/pr-25845

fix(wasm-a11y): Mirror scroll geometry in the semantic DOM (backport #25587) (backport #25845)
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.

5 participants