This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
A11y callback #8005
Merged
Merged
A11y callback #8005
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
acb9dd9
implement callback for a11y readiness
dnfield 6f0125f
Merge remote-tracking branch 'upstream/master' into a11y_callback
dnfield c51c40b
fix unintended change, update docs, nit
dnfield d8e6ba5
save before commiting
dnfield f814fcc
Use NSNotificationCenter
dnfield 865043e
Add doc with notification name
dnfield 1d2b8c1
add constant
dnfield f5e8b39
use FlutterSemanticsUpdateNotification from header, move to VC header
dnfield File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Let me know if I'm wrong: In the perspective FlutterViewController user, it's hard to find a right time to enable semantics before the first semantics tree being built.
I think it will be easier if FlutterViewController can take the preference and invoke this method when _engineNeedsLaunch is used :).
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.
Semantics might already be enabled based on device settings or if it's a simulator. It should be safe to call this method even if semantics are enabled - if they're not, no semantics tree will be built.
We could make it an option in the initializer, but I'm not sure how that would help for testing.
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.
Or maybe a property/one-way-method of FlutterViewController? User can check if they need to force enabling semantics through several ways, such as plist or envs. If it's the case, they can flip the bit after calling initilizer, but before load the VC.
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.
The
ensureSemanticsEnabled
is safe to call at any time. Basically, the idea is to just call it right after you register for the callback. You could in theory call it in a loop after that as long as you let the main runloop make progress.