Refine the directional traversal algorithm for out of band widgets#122556
Refine the directional traversal algorithm for out of band widgets#122556auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
cbracken
left a comment
There was a problem hiding this comment.
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.
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.
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