-
Notifications
You must be signed in to change notification settings - Fork 6k
Live region announcements for iOS #18798
Conversation
jmagman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Mac Host Engine is a flake - retrying at https://ci.chromium.org/p/flutter/builders/try/Mac%20Host%20Engine/6285 |
|
LGTM |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lib/ui/semantics.dart
Outdated
| /// if the user does not have focus of the widget. | ||
| /// An example of a live region is a [SnackBar] widget. On Android and iOS, | ||
| /// live region causes a polite announcement to be generated automatically, | ||
| /// even if the user does not have focus of the widget. This announcement may |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we say: "even if the widget does not have accessibility focus" - I think that's slightly clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Description
Implements live region announcements for iOS.
If iOS 11 or greater is available, use a queued announcement. Otherwise, use a regular announcement.
This patch also drops the
FrequentlyUpdatestrait, which seems like it was just added as a misunderstanding at some point - that trait makes the screen reader less likely to read the change on a frequently changing value, and is recommended for things like timers./cc @vick08 @j-sid @cookiecrook @caseyburkhardt who provided feedback on the issue.
Related Issues
fixes flutter/flutter#45968 (there is no framework side to this component).
Tests
I added the following tests:
Tests for the new method on SemanticsObject that determines whether an announcement should be issued for live regions.
Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.