Fixed the sliver appbar to have a fixed traversal order#65049
Fixed the sliver appbar to have a fixed traversal order#65049fluttergithubbot merged 4 commits intoflutter:masterfrom
Conversation
dnfield
left a comment
There was a problem hiding this comment.
This seems reasonable to me, but would appreciate feedback from @goderbauer about whether this is really the right thing to do.
We may also want to add a comment about why we're using sort keys here (i.e. we want to cover the case where the app bar is collapsed, and on some platforms a11y doesn't scroll "enough" to expand it before arriving at it, resulting in incorrect default sorting order).
The more I think about this, the more it seems right to me, but I'm worried I'm missing something here :)
|
I want to point out that ios voiceover will scroll to expand the flexible space after the flexible space receive the focus, but at that point it is already too late that the focus traverse to it with the wrong order |
Description
The ios voiceover by default uses the center position of each semantics nodes to determine the focus traverse order.
When the flexible space collapsing and expanding, it changes its center position of it semantics node which cause it to have a different focus traverse order. This causes confusion to user that they may have different accessibility order when they traverse out the header when it is expanded and traverse back to the header after it is collapsed.
This pr add a fixed traversal order of the sliver app bar by using a sort key.
Related Issues
Fixes #64922
Tests
I added the following tests:
see files
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.