-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Update the AccessibilityPlugin::Announce method to account for the view #172669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
0f84654
to
e81b319
Compare
e81b319
to
29aa8c9
Compare
engine/src/flutter/shell/platform/windows/accessibility_plugin.cc
Outdated
Show resolved
Hide resolved
@hannah-hyj Could you also review this as it affects accessibility announcements? For multi-window on Windows, we need to route the accessibility announcement to the right window. This requires piping a view ID in the accessibility announcement. |
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.
Functionally this looks good to me, but we should avoid the breaking change.
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.
Windows changes look good to me!
Framework changes look to good to me as well, but please get an approval from an accessibility expert like @hannah-hyj before merging.
CI had a failure that stopped further tests from running. We need to investigate to determine the root cause. SHA at time of execution: d1d01ef. Possible causes:
A blank commit, or merging to head, will be required to resume running CI for this PR. Error Details:
Stack trace:
|
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
/// | ||
/// {@macro flutter.semantics.service.announce} | ||
static Future<void> sendAnnouncement( | ||
int viewId, |
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.
Feels weird about forcing people to give an id, even for non-multiview case
Can we choose one of the following?
-
use kImplicitViewId if not provided
-
let SemanticsService to be a per View object instead of a global singleton, and use SemanticsService.of(context).annonce() instead, or View.of(context).semanticsService.announce
I slightly more leaning toward 2 since i imagine we may have more method added into this class in the future.
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.
I am leaning towards 1 because it allows SemanticsService
to continue to be a static service, rather than needing to maintain global instances of it. What do you think?
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.
I am ok with that. if that is the case, we should reuse the original announce with an optional view_id parameter so that we don't need a breaking change
What's new?
view_id
view_id
is used to lookup the correspondingFlutterView
in the win32 embedderPre-launch Checklist
///
).