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+).

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@dnfield dnfield merged commit 5ca8aad into flutter:master Jan 7, 2019
@dnfield dnfield deleted the a11y_in_list branch January 7, 2019 21:36
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 7, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 7, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
bkonyi added a commit to flutter/flutter that referenced this pull request Jan 8, 2019
flutter/engine@7112b72...e5ec3cf

git log
7112b72..e5ec3cf
--no-merges --oneline
e5ec3cf Dart SDK roll for 2019-01-08
08c95d2 Roll src/third_party/skia 55ff5d3ba881..1337f5b85978 (10
commits) (flutter/engine#7407)
e385f5c Roll src/third_party/skia 26d173fee72b..55ff5d3ba881 (12
commits) (flutter/engine#7406)
0f8273b Dart SDK roll for 2019-01-07
4036b26 Reset ParagraphBuilder after build() (flutter/engine#7401)
4820cbe Dart SDK roll for 2019-01-07
8eccb86 Add onStart hook to FlutterFragmentActivity
(flutter/engine#6719)
f2ea838 Roll src/third_party/skia b2fdcbf3033f..26d173fee72b (10
commits) (flutter/engine#7400)
5ca8aad Announce in/out of list (flutter/engine#6918)
4487d39 Replace Java code with equivalent, more concise code.
(flutter/engine#7398)
395b785 Roll src/third_party/skia 46ee3f7a8ff5..b2fdcbf3033f (11
commits) (flutter/engine#7394)
5965f90 Make `ParagraphConstraints` have const constructor
(flutter/engine#7346)
e02dd41 Roll src/third_party/skia a47eb455360f..46ee3f7a8ff5 (2
commits) (flutter/engine#7390)
f0038b3 Roll src/third_party/skia 3ac3a4053f86..a47eb455360f (2
commits) (flutter/engine#7389)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 8, 2019
bkonyi added a commit to flutter/flutter that referenced this pull request Jan 9, 2019
flutter/engine@7112b72...e5ec3cf

git log
7112b72..e5ec3cf
--no-merges --oneline
e5ec3cf Dart SDK roll for 2019-01-08
08c95d2 Roll src/third_party/skia 55ff5d3ba881..1337f5b85978 (10
commits) (flutter/engine#7407)
e385f5c Roll src/third_party/skia 26d173fee72b..55ff5d3ba881 (12
commits) (flutter/engine#7406)
0f8273b Dart SDK roll for 2019-01-07
4036b26 Reset ParagraphBuilder after build() (flutter/engine#7401)
4820cbe Dart SDK roll for 2019-01-07
8eccb86 Add onStart hook to FlutterFragmentActivity
(flutter/engine#6719)
f2ea838 Roll src/third_party/skia b2fdcbf3033f..26d173fee72b (10
commits) (flutter/engine#7400)
5ca8aad Announce in/out of list (flutter/engine#6918)
4487d39 Replace Java code with equivalent, more concise code.
(flutter/engine#7398)
395b785 Roll src/third_party/skia 46ee3f7a8ff5..b2fdcbf3033f (11
commits) (flutter/engine#7394)
5965f90 Make `ParagraphConstraints` have const constructor
(flutter/engine#7346)
e02dd41 Roll src/third_party/skia a47eb455360f..46ee3f7a8ff5 (2
commits) (flutter/engine#7390)
f0038b3 Roll src/third_party/skia 3ac3a4053f86..a47eb455360f (2
commits) (flutter/engine#7389)
gamebox pushed a commit to gamebox/flutter that referenced this pull request Jan 28, 2019
flutter/engine@7112b72...e5ec3cf

git log
7112b72..e5ec3cf
--no-merges --oneline
e5ec3cf Dart SDK roll for 2019-01-08
08c95d2 Roll src/third_party/skia 55ff5d3ba881..1337f5b85978 (10
commits) (flutter/engine#7407)
e385f5c Roll src/third_party/skia 26d173fee72b..55ff5d3ba881 (12
commits) (flutter/engine#7406)
0f8273b Dart SDK roll for 2019-01-07
4036b26 Reset ParagraphBuilder after build() (flutter/engine#7401)
4820cbe Dart SDK roll for 2019-01-07
8eccb86 Add onStart hook to FlutterFragmentActivity
(flutter/engine#6719)
f2ea838 Roll src/third_party/skia b2fdcbf3033f..26d173fee72b (10
commits) (flutter/engine#7400)
5ca8aad Announce in/out of list (flutter/engine#6918)
4487d39 Replace Java code with equivalent, more concise code.
(flutter/engine#7398)
395b785 Roll src/third_party/skia 46ee3f7a8ff5..b2fdcbf3033f (11
commits) (flutter/engine#7394)
5965f90 Make `ParagraphConstraints` have const constructor
(flutter/engine#7346)
e02dd41 Roll src/third_party/skia a47eb455360f..46ee3f7a8ff5 (2
commits) (flutter/engine#7390)
f0038b3 Roll src/third_party/skia 3ac3a4053f86..a47eb455360f (2
commits) (flutter/engine#7389)
kangwang1988 pushed a commit to XianyuTech/flutter that referenced this pull request Feb 12, 2019
flutter/engine@7112b72...e5ec3cf

git log
7112b72..e5ec3cf
--no-merges --oneline
e5ec3cf Dart SDK roll for 2019-01-08
08c95d2 Roll src/third_party/skia 55ff5d3ba881..1337f5b85978 (10
commits) (flutter/engine#7407)
e385f5c Roll src/third_party/skia 26d173fee72b..55ff5d3ba881 (12
commits) (flutter/engine#7406)
0f8273b Dart SDK roll for 2019-01-07
4036b26 Reset ParagraphBuilder after build() (flutter/engine#7401)
4820cbe Dart SDK roll for 2019-01-07
8eccb86 Add onStart hook to FlutterFragmentActivity
(flutter/engine#6719)
f2ea838 Roll src/third_party/skia b2fdcbf3033f..26d173fee72b (10
commits) (flutter/engine#7400)
5ca8aad Announce in/out of list (flutter/engine#6918)
4487d39 Replace Java code with equivalent, more concise code.
(flutter/engine#7398)
395b785 Roll src/third_party/skia 46ee3f7a8ff5..b2fdcbf3033f (11
commits) (flutter/engine#7394)
5965f90 Make `ParagraphConstraints` have const constructor
(flutter/engine#7346)
e02dd41 Roll src/third_party/skia a47eb455360f..46ee3f7a8ff5 (2
commits) (flutter/engine#7390)
f0038b3 Roll src/third_party/skia 3ac3a4053f86..a47eb455360f (2
commits) (flutter/engine#7389)
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.

3 participants