Skip to content

Conversation

@chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Sep 1, 2020

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Sep 1, 2020
@chunhtai chunhtai changed the title Issues/64922 Fixed the sliver appbar to have a fixed traversal order Sep 1, 2020
@flutter-dashboard flutter-dashboard bot added the a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) label Sep 1, 2020
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

@chunhtai
Copy link
Contributor Author

chunhtai commented Sep 2, 2020

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

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SliverAppBar with actions navigates in an unexpected order when using VoiceOver

5 participants