Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Nov 20, 2018

Fixes flutter/flutter#22876

This makes it so that TalkBack will announce in/out of list under the following conditions:

  1. The List has a specified number of children for semantics purposes. Without this, we don't know how many columns or rows to tell TalkBack to announce, and without that, TalkBack won't announce in or out of list.
  2. The currently focused A11y node is a child of the list or the currently focused A11y node does not have a parent that has implicit scrolling. This is needed because TalkBack only tracks one list at a time, and so if we have multiple or nested lists it would only announce one. The second part of the check is needed because we want to announce out of list if you move focus to a non-list node.

We really should expose semantics properties for row and column counts, to better support multi-dimensional list-like widgets (like GridView, or third party widgets that want to have better scrolling semantics).

I've added a Predicate utility class because even with Lambda support in Java 1.8, we won't be able to use java.util.function.Predicate (only available in API 24+).

@dnfield
Copy link
Contributor Author

dnfield commented Nov 20, 2018

This should be on my fork, not the flutter one. Will reopen.

@dnfield dnfield closed this Nov 20, 2018
@dnfield dnfield deleted the a11y_in_list branch November 20, 2018 23:45
@dnfield
Copy link
Contributor Author

dnfield commented Nov 21, 2018

Opened from correct fork on #6918

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants