Skip to content

Breaking changes branch update - #23539

Merged
MartinZikmund merged 166 commits into
feature/breakingchangesfrom
de/mazi/breaking24jun
Jun 24, 2026
Merged

MartinZikmund merged 166 commits into
feature/breakingchangesfrom
de/mazi/breaking24jun

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

…drop"

This reverts commit e7518b8, reversing
changes made to 4990906.

Conflicts:

src/Directory.Build.propsGitHub Issue: closes

PR Type:

What changed? 🚀

PR Checklist ✅

MartinZikmund and others added 30 commits January 5, 2026 14:42
Adds the 003-wasm-a11y-remediation spec, plan, tasks, research, quickstart, data model, interop contracts, and two runtime-observed findings (NavigationView overflow, aria-label on name-prohibited roles).
Shared (Uno.UI) changes consumed by all Skia targets:

- AriaMapper: map AutomationControlType/HeadingLevel/LandmarkType/Orientation to ARIA, derive Name from direct TextBlock content, gate role=region on scrollability + a real name, emit aria-labelledby from LabeledBy, gate aria-roledescription to authored LocalizedControlType only, surface aria-invalid from IsDataValidForForm, and remove an unsubstantiated try/catch in IsScrollable.
- AutomationProperties: wire IsDataValidForForm and HeadingLevel change callbacks under #if __SKIA__ so a runtime change reaches assistive tech via NotifyPropertyChangedEvent (both backends consume it: WASM updates aria-invalid/aria-level; Win32 updates UIA_IsDataValidForFormPropertyId / UIA_HeadingLevelPropertyId).
- TextBlock: raise a NameProperty PropertyChanged when the accessible name is derived from Text and Text changes at runtime, so the a11y tree re-reads the name (matches WinUI's implicit name re-derivation).
…tree

C# bridge that projects the AutomationPeer tree into a parallel semantic DOM next to the canvas:

- SemanticElementFactory: create-time appliers for role, name, AutomationId, headings, landmarks, aria-orientation/level/busy/lang, aria-labelledby, aria-invalid, aria-roledescription; empty-attribute suppression.
- WebAssemblyAccessibility: tree build/maintenance — realize virtualized items before AOM build, prune Collapsed subtrees, re-emit on Collapsed -> Visible, skip Raw decorative items in virtualized backfill, don't expose Raw virtualized containers as listboxes, expose standalone body text, coalesce nullable role/name at AddSemanticElement, keep role on unnamed main/navigation/search landmarks, order-independent aria-labelledby resolution with backfill (entries kept across drains), gate region/roledescription using the shared AriaMapper heuristics, ComboBox text dedup, ImplicitTextBlock filtering, IsSemanticElement as instance.
- WebAssemblyAccessibility.ComboBox: expose the open ComboBox dropdown as an ARIA listbox; suppress duplicate option <p> and dialog Popup nodes.
- VirtualizedSemanticRegion: focus the virtualized item's own node, not its ancestor.
- FocusSynchronizer: gate WASM tabindex emission to focusables.
TypeScript side of the semantic DOM:

- SemanticElements: create the right HTML element per role (button, checkbox, radio, slider, listbox/option, combobox, headings <h1>-<h6> with true aria-level 1-9, landmarks, etc.); emit aria-orientation/level/busy/lang, aria-labelledby, aria-invalid, aria-roledescription, xamlautomationid on factory-path elements; omit empty ARIA attributes on create; don't emit ImplicitTextBlock as standalone body text.
- Accessibility: updateAriaLabel/updateAriaInvalid/updateAriaLevel setters; omit empty aria-label in updateAriaLabel; tabindex gated to focusables.
Re-enables DOM-level assertions in the existing suite (Button, CheckBox, ComboBox, ListView, Slider, TextBox) and adds focused coverage:

- Given_AccessibleAria: ARIA attribute emission (label/labelledby/roledescription/invalid/orientation/busy/lang), virtualized realization, Collapsed pruning, Collapsed -> Visible re-emit, landmark gating, runtime Name propagation, order-independent labelledby.
- Given_AccessibleHeading: HeadingLevel 1-9 tag clamp + true aria-level, live-sync of aria-level.
- Given_AccessibleScrollViewer: role=region gated on scrollability + a real name.
- Given_AccessibleTabindex: tabindex gated to focusables; AutomationId/role mapping on focusables.
OnAutomationIdChanged on native WASM was setting aria-label from the
AutomationId value unconditionally, conflating the programmatic
identifier with the accessible name. It also failed to remove a stale
role attribute when the AutomationId normalized to null.

Drop the bogus aria-label assignment (Name is the only source for that)
and explicitly RemoveAttribute(`role`) when no role can be derived.

Co-authored-by: Copilot <[email protected]>
… names

RaiseAutomationNameChangedIfNeeded raised AutomationPropertyChanged for
the Name property whenever the displayed Text changed, even when an
explicit LabeledBy was supplying the accessible name. That produced
bogus change notifications for assistive tech.

Skip the event when LabeledBy is set, and add a secondary guard that
only fires when the peer's GetName() actually equals the new text (i.e.
Text really is what drives the name).

Co-authored-by: Copilot <[email protected]>
… test helpers

Each Given_Accessible* file carried its own copy of EnableAccessibilityThroughDom,
InvokeBrowserJs, GetSemanticElementId, SemanticElementExists, GetSemanticAttribute,
SemanticElementHasAttribute, GetSemanticElementTagName, and GetSemanticInputType.

Move them into a single WasmSemanticDomHelper static class (HAS_UNO-gated) and
add `using static` to the 10 test files, also gated so WinUI/WinAppSDK runs
remain buildable.

Co-authored-by: Copilot <[email protected]>
…mber

Previously createRadioElement set tabIndex=0 only on a checked radio. A
radio group where nothing is initially checked would create no tab stop
at all (every radio at -1), so keyboard users could not reach the group
to begin with -- violating the APG roving-tabindex pattern.

After append, if this focusable, unchecked radio joined a named group
that still has no tab stop, promote it to tabIndex=0 so the group is
reachable via Tab.

Co-authored-by: Copilot <[email protected]>
…update

Two attribute-emission paths still wrote empty/whitespace values, leaving
`aria-label=` ` ` ` or `xamlautomationid=` ` ` ` on the DOM:

- The element-creation path in addSemanticElement emitted aria-label
  and xamlautomationid for any truthy string, including whitespace-only
  values; mirror updateAriaLabel by requiring trim().length > 0.
- setXamlAutomationId could only set, never clear. Pass an empty value
  and the attribute stayed with an empty string. Match the
  updateAriaLabel pattern: set when meaningful, removeAttribute otherwise.

Co-authored-by: Copilot <[email protected]>
ContainsRealizedHandle used Dictionary<int, IntPtr>.ContainsValue, which
is O(n). On the focus/lookup hot path this scaled poorly with large
realized item sets.

Track a parallel HashSet<IntPtr> updated alongside _realizedHandles
on realize/unrealize/dispose, and route ContainsRealizedHandle through
the set for O(1) lookups.

Co-authored-by: Copilot <[email protected]>
The using-static import for WasmSemanticDomHelper is gated on HAS_UNO,
but the test methods consuming it were gated on __SKIA__. A build that
defined __SKIA__ without HAS_UNO would compile the test bodies without
the helper import. Align the test-body gate to HAS_UNO to match the
helper-import gate (and the helper class's own gate).

Co-authored-by: Copilot <[email protected]>
Per FR-020 the accessible name belongs to the control, not the selection.
Overwriting aria-label with the selected value (e.g. 'France') destroys
the head's name composition (e.g. 'Country') and causes the screen
reader to announce the value where the name should be.

Drop the UpdateAriaLabel call: the existing aria-activedescendant update
points to the selected ComboBoxItem, whose own text the screen reader
announces alongside the head's preserved name. aria-valuetext is the
correct attribute for reflecting the selected text on the head itself
and can be added separately when an editable-combobox UX is needed.

Co-authored-by: Copilot <[email protected]>
None of 'dataitem', 'header', or 'appbar' are valid WAI-ARIA role tokens
and they get rejected by the accessibility tree (same class of bug we
already fixed for 'label'/Text).

- DataItem outside a grid has no native ARIA equivalent.
- Header maps to HTML <header>'s implicit role (banner/generic), not a
  literal 'header' token.
- AppBar is UWP/macOS terminology.

Map all three to null, and drop the AppBar/CommandBar short-circuit
that previously hard-emitted 'appbar' ahead of the AutomationControlType
switch.

Co-authored-by: Copilot <[email protected]>
…oString

selected.ToString() yields the type name for non-string item view models,
producing nonsense accessible text. Mirror WinUI's selection-text
resolution: prefer the value pattern (which honors DisplayMemberPath and
item-template-bound value providers), and fall back to ToString only
when no value provider is exposed.

Co-authored-by: Copilot <[email protected]>
OnItemUnrealized was clearing _realizedHandles[index] unconditionally. If a
new item was realized into the same index before the unrealize callback
arrived, the index now belonged to a different live handle and the eviction
would desync state from the DOM. Only clear the mapping when it still points
at the same handle, and always purge the handle from _realizedHandleSet
independently so the O(1) membership check stays consistent.

Co-authored-by: Copilot <[email protected]>
GetSemanticElementId interpolated the Visual.Handle using the current culture,
which could format the long differently than the runtime when tests run under
a non-invariant culture. Switch to ToString(CultureInfo.InvariantCulture) so
the computed DOM id always matches what the runtime emits.

Co-authored-by: Copilot <[email protected]>
Several createXxxElement entry points accept isFocusable for JSImport-signature
uniformity but intentionally do not apply it (headings, dataitem/header/appbar
landmarks, captions, composite containers). Renaming to _isFocusable makes the
intent explicit so future refactors do not accidentally assume the value is
being honored. Parameters are bound positionally by JSImport so the rename is
a no-op at runtime.

Co-authored-by: Copilot <[email protected]>
setAccessKey treated whitespace-only strings as truthy and emitted
accesskey with a single space, which is meaningless to assistive tech and
can interfere with browser shortcut handling. Mirror the omit-when-empty
contract used by updateAriaLabel and setXamlAutomationId: trim, then remove
the attribute when empty.

Co-authored-by: Copilot <[email protected]>
updateAriaHasPopup and updateLang followed the truthiness shortcut and would
emit aria-haspopup with a single space (a malformed token that AT treats as
"true") or lang with a single space (invalid per the BCP-47 grammar). Mirror
the trim-and-omit contract used by updateAriaLabel, setAccessKey, and
setXamlAutomationId so meaningless attributes are never persisted.

Co-authored-by: Copilot <[email protected]>
The new DOM-level tests call InvokeBrowserJs many times per test (every
attribute read goes through it), and re-resolving the runtime Type and
MethodInfo on each call shows up as runner overhead. Move the lookup behind
a Lazy<MethodInfo> initializer so we still fail fast on a runtime rename but
only pay the resolution cost once per test run.

Co-authored-by: Copilot <[email protected]>
The three slider tests for Orientation, Level, and ItemStatus/Culture only
verified that AutomationProperties round-tripped, not that the mapping the
docstring described actually emitted the right ARIA attribute. The vertical-
orientation roundtrip was already covered by a DOM-level test below, so this
removes the redundant smoke and folds Level/ItemStatus/Culture into one
cross-platform DP roundtrip. Two new SkiaWasm-gated DOM tests assert
aria-level, aria-busy, and lang on the live semantic node, matching the
existing aria-orientation DOM test pattern, so a regression in the WASM
mapping now fails the suite.

Co-authored-by: Copilot <[email protected]>
The helper trimmed the input for the empty-string check but then wrote
the untrimmed value to the DOM, so attributes could end up with leading
or trailing whitespace. Write the trimmed value to match the contract.

Co-authored-by: Copilot <[email protected]>
IsComboBoxDropdownPopup previously walked every registered ComboBox on
every popup open. Maintain a reverse Popup->ComboBox map populated when
the dropdown first opens, with a linear-scan fallback that self-heals
the map on first hit for popups created before DropDownOpened fires.

Co-authored-by: Copilot <[email protected]>
The parameter previously named `automationId` was misleading: it is
the aria-label source, not AutomationProperties.AutomationId (which is
passed separately as xamlAutomationId). Rename to `ariaLabel` and
write the trimmed value to match setAriaStringAttribute.

Co-authored-by: Copilot <[email protected]>
@github-actions github-actions Bot added platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Jun 24, 2026
@CLAassistant

CLAassistant commented Jun 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 8 committers have signed the CLA.

✅ ajpinedam
✅ nickrandolph
❌ github-actions[bot]
❌ MartinZikmund
❌ vatsashah45
❌ Nick Randolph
❌ jeromelaban
❌ dr1rrb


Nick Randolph seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 7m 56s —— View job


PR Review

  • Gather context and understand the PR
  • Analyze diff and changed files
  • Post inline review comments
  • Update summary comment

Overall verdict: Approve with minor issues. This is a solid, well-structured batch of changes — the composition animation overhaul (scoped batches, keyframe expression support, shape animations, CompositionContainerShape) is clearly reasoned and the hot-reload handler contract change (handler now called on every terminal outcome) is well-tested and well-documented. No blocking issues found.

Counts: 2 medium · 3 nits · 0 blocking


Cross-cutting observations

What's well done:

  • The IHotReloadHandler.SendAsync → OnHotReloadAsync contract change is comprehensive: spec, implementation, tests, harness, and adapter (DelegateHotReloadHandler) all updated together. The new tests cover all spec clauses (§1/§2/§3) including the idempotency and handler-throws paths.
  • ArrayPool<string> use in CompositionObject.ReEvaluateAnimation correctly avoids per-frame allocations on the snapshot. The try/finally return is correct.
  • CompositionScopedBatch implementation matches WinUI semantics: End() marks the batch as ended but Completed fires after tracked animations actually stop; the dispatcher post in RaiseCompleted breaks the re-entrancy stack-overflow risk (correctly documented).
  • The this.Target expression resolution in AnimationIdentifierNameSyntax is cleanly layered: the identifier caches the animation reference and AnimationMemberAccessExpressionSyntax resolves .Target dynamically via AnimationTargetObject. Reuse between re-starts is safe.
  • CompositionSpriteShape: splitting stretch into SetGeometryTransform vs composition API transforms is an important semantic fix — stroke thickness no longer scales with stretch.
  • NativeDispatcher.RemoveCompositionTargets correctly evaluates the predicate outside the lock (avoids deadlock) and accounts for already-consumed render actions under the second lock.

Issues found (inline):

  1. Medium – AnimationFunctionCallSyntax.cs:55 — .Select().ToArray() allocates per frame on the expression keyframe evaluation path.
  2. Medium – SubPropertyHelpers.cs:40 — return default! silently zeroes animated properties on type mismatch; ! hides a potential NRE on reference-type T.
  3. Minor – HotReloadManager.cs:213 — FIXME committed about GetCompilationErrors diagnostics not reaching the handler on the compilation-error Failed path.
  4. Nit – CompositionObject.cs:154,208 — _animations is null check inside the snapshot loop is unreachable dead code.
  5. Nit – KeyFrameEvaluator.cs:40 — resolve parameter and _resolve field should be ?-annotated.
  6. Nit – Compositor.cs:237 — out-of-order batch End() defensive path has no warning log.
  7. Nit – CompositionScopedBatch.cs:76 — _hasPending flag is equivalent to _pendingAnimations.Count == 0 at the End() call site; the extra boolean can be removed.

Comment thread src/Uno.HotReload/HotReloadManager.cs Resolved
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 219599 did not find any UI Test snapshots differences.

@MartinZikmund MartinZikmund changed the title fix: Fallback from Segoe UI Symbol to configured symbol font Breaking changes branch update Jun 24, 2026
@MartinZikmund
MartinZikmund enabled auto-merge June 24, 2026 13:53
@github-actions

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 6m 51s —— View job


PR Review

  • Gather context and understand the PR
  • Analyze diff and changed files
  • Post inline review comments
  • Update summary comment

Overall verdict: Approve with minor issues. This is a solid, well-structured batch of changes — the composition animation overhaul (scoped batches, keyframe expression support, shape animations, CompositionContainerShape) is clearly reasoned, and the hot-reload handler contract change (handler now called on every terminal outcome) is well-tested and well-documented.

New inline findings from this pass: 1 medium · 2 nits


Cross-cutting observations

What's well done:

  • CompositionScopedBatch implements WinUI semantics correctly: End() marks the batch as ended but Completed fires only after tracked animations stop; the dispatcher post in RaiseCompleted breaks the re-entrancy/stack-overflow risk.
  • ArrayPool<string> snapshot in CompositionObject.ReEvaluateAnimation correctly avoids per-frame allocation; the try/finally return is safe.
  • The IHotReloadHandler.SendAsync → OnHotReloadAsync contract change is comprehensive: spec, implementation, tests, harness, and DelegateHotReloadHandler adapter updated together; new tests cover all spec clauses including idempotency and handler-throws paths.
  • CompositionSpriteShape: splitting stretch (SetGeometryTransform) from composition-API transforms (canvas) is an important semantic fix — stroke thickness no longer scales with stretch.
  • this.Target expression resolution in AnimationIdentifierNameSyntax is cleanly layered: the identifier caches the animation reference, and AnimationMemberAccessExpressionSyntax resolves .Target dynamically via AnimationTargetObject. Reuse between restarts is safe.
  • NativeDispatcher.RemoveCompositionTargets correctly evaluates the predicate outside the lock to avoid deadlock and accounts for already-consumed render actions under the second lock.
  • The CompositionShape.skia.cs refactor correctly applies composition-API transforms through the canvas (affecting stroke) while baking stretch into geometry (not affecting stroke) — matching WinUI semantics.

New issues found:

  1. Medium – Generated/CompositionContainerShape.cs:4 — hand-edit to a generated file using #if false || false (should be #if __NETSTD_REFERENCE__ or removed); violates AGENTS.md "never edit Generated/ folders".
  2. Nit – CompositionScopedBatch.cs:107 — Resume() sets IsActive=true after End() sets IsEnded=true, creating inconsistent observable state; guard with if (!IsEnded).
  3. Nit – AnimatedVisualsTestbedPage.xaml.cs:95 and AnimatedBackVisualSourceSamplePage.xaml.cs — async void event handlers without try/catch violate the repo's async discipline rule.

Previously flagged issues (from prior review pass) that are still open:

  • AnimationFunctionCallSyntax.cs:55 — .Select().ToArray() per-frame allocation (medium)
  • SubPropertyHelpers.cs:40 — return default! incorrect null-suppressor (medium)
  • HotReloadManager.cs:213 — FIXME committed as-is (minor)
  • CompositionObject.cs:154,208 — dead _animations is null guard in snapshot loop (nit)
  • KeyFrameEvaluator.cs:40 — missing ? annotation on resolve parameter/field (nit)
  • Compositor.cs:237 — out-of-order End() path has no warning log (nit)
  • CompositionScopedBatch.cs:76 — _hasPending is redundant with _pendingAnimations.Count == 0 (nit)

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 219632 did not find any UI Test snapshots differences.

@MartinZikmund
MartinZikmund merged commit 23223f4 into feature/breakingchanges Jun 24, 2026
69 checks passed
@MartinZikmund
MartinZikmund deleted the de/mazi/breaking24jun branch June 24, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/documentation platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform 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.