Repository navigation
fix(a11y): Keep live name updates off name-prohibited roles (backport #25646) - #25802
Closed
mergify[bot] wants to merge 3 commits into
Closed
mergify[bot] wants to merge 3 commits into
mergify[bot] wants to merge 3 commits into
Conversation
(cherry picked from commit 36f0b3c) # Conflicts: # src/Uno.UI.RuntimeTests/Microsoft/UI/Xaml/Automation/Given_WasmAria.cs
(cherry picked from commit ec781db) # Conflicts: # src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Accessibility/WebAssemblyAccessibility.cs
(cherry picked from commit 0dfb0e2) # Conflicts: # src/Uno.UI.Runtime.Skia.WebAssembly.Browser/Accessibility/WebAssemblyAccessibility.cs
Contributor
Author
|
Cherry-pick of 36f0b3c has failed: Cherry-pick of ec781db has failed: Cherry-pick of 0dfb0e2 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
2 of 5 tasks
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: internal
PR Type:
🐞 Bugfix
What changed? 🚀
On WebAssembly with accessibility enabled, a name that changes after its semantic node was created went straight to
aria-label, whatever the node's role was. This is common when accessibility is on during app start, because bindings resolve after the tree is built.TextBlockemitted as a bare<p>kept its original text, and the new text was added asaria-label. A paragraph is named by its content and prohibitsaria-label, so the paragraph now gets the new text as its content and noaria-label.createTextElementmarks these nodes withdata-uno-standalone-textso the update can find them.ResolveGenericRoleis now the only place that decides the role of a node built by the generic path. Creation, the Name and LandmarkType updates, and the post-layout ScrollViewer check all call it, so a node gets the same role whatever order its name, landmark type and scrollability arrive in. Which nodes the generic path built is recorded at creation. Factory nodes keep their own role: agridcellused to turn intogroupon a name change.genericnode becomesgroup, and goes back togenericwhen the name is cleared (WA-01).region/formlandmark that gets its name after creation is now exposed. That includes aTextBlocklandmark named by its text.role=dialogset by its focus trap.Navigationkeeps it instead of becomingregion.genericinstead ofgroup, and a whitespace-named region, form or scroll region is not exposed.Tests (Skia WASM):
When_Generic_Named_After_Creation_Then_Role_GroupWhen_Standalone_Text_Changes_Then_Paragraph_Text_Updated_Without_AriaLabelWhen_Generic_Name_Becomes_Whitespace_Then_Role_GenericWhen_Region_Landmark_Named_After_Creation_Then_Role_RegionWhen_Landmark_TextBlock_Gets_Text_Then_Role_RegionWhen_GridCell_Named_After_Creation_Then_Role_Stays_GridCellWhen_Standalone_Text_Gets_Name_Then_Paragraph_Has_No_RoleGiven_AccessibleScrollViewer.When_Navigation_ScrollViewer_Resized_Then_Role_Stays_NavigationGiven_AccessibleScrollViewer.When_Whitespace_Named_ScrollViewer_Resized_Then_No_RegionThe first two fail without this PR. Each test added during review failed on the PR head that came before its fix. The exception is
When_Standalone_Text_Gets_Name_Then_Paragraph_Has_No_Role, which guards the<p>case.Follow-ups, not in this PR:
aria-label, so the visible heading text can go stale.LandmarkTypeon a factory node writes the role mapped from its control type. For a grid cell that isgeneric, notgridcell.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
This is an automatic backport of pull request #25646 done by [Mergify](https://mergify.com).