Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout View Resorting is breaking Windows Narrators ability to navigate through elements #6140

Closed
PureWeen opened this issue Apr 15, 2022 · 1 comment
Labels
area/a11y Relates to accessibility area/layout 🔲 StackLayout, GridLayout, ScrollView, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/windows 🪟 t/bug Something isn't working

Comments

@PureWeen
Copy link
Member

PureWeen commented Apr 15, 2022

Description

The LayoutHandler sorts all of its children via OrderByZIndex which uses an Array.Sort and a comparer. This causes the elements to all change logical position when they added to the Panel. Narrator is unable to reconstruct the semantic order just by the location of the elements on the screen.

If you remove the OrderByZIndex call then Narrator works without any issues. OrderByZIndex also appears to break TabIndex ordering as well.

Steps to Reproduce

  1. Load up controls sample gallery
  2. go to the buttons controls page
  3. turn on narrator
  4. hit the tab key (or swipe forward) to navigate through elements

Possible workarounds

  • Fix the OrderByZIndex so all elements with a matching Zindex maintain the same logical order they are added to the layout as. I do wonder if this solution still doesn't quite work because it will still place two elements logically very far apart even though they visually aren't.
  • We're going to have to create a custom automation peer for layouts to resolve some other issues, so in theory we could add a custom automation peer that's able to return the elements in the logical order the user added them in.

Version with bug

Release Candidate 1 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

WinUI

Did you find any workaround?

No response

Relevant log output

No response

@PureWeen PureWeen added t/bug Something isn't working area/layout 🔲 StackLayout, GridLayout, ScrollView, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter area/a11y Relates to accessibility labels Apr 15, 2022
@PureWeen PureWeen added this to the 6.0.300-rc.3 milestone Apr 15, 2022
@hartez hartez removed their assignment Aug 2, 2022
@PureWeen
Copy link
Member Author

Fixed by #7270

@dotnet dotnet locked as resolved and limited conversation to collaborators Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/a11y Relates to accessibility area/layout 🔲 StackLayout, GridLayout, ScrollView, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants