-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Refine the directional traversal algorithm for out of band widgets #122556
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
Refine the directional traversal algorithm for out of band widgets #122556
Conversation
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any user-facing documentation that discusses the navigation key traversal behaviour? If so, does it already document this behaviour as now implemented?
yjbanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the accessibility traversal algorithm need to be updated too?
Accessibility traversal order in a direction is handled by the screen reader, we don't control that. |
loic-sharma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'm not very familiar with this area :)
|
There is some discussion here, but it doesn't go into that much detail. I'll try and add some detail, but I worry a little that it might just be too much detail and their eyes will glaze over. :-) |
5c3cd3b to
b609428
Compare
Description
This updates the directional traversal algorithm so that if you traverse down (or any other direction), and there isn't a widget below in the band created by the infinite height box the width of the currently focused widget, then we prefer the widget with one side closest to the band, and if there are two the same distance from the band, then we prefer the closest one vertically.
This layout used to do the wrong thing when you went down, preferring the one whose center was closest to the band, rather than the closest side:
before.mp4
And here is the new code:
after.mp4
Tests