Add set semantics enabled API and wire iOS a11y bridge#161265
Merged
auto-submit[bot] merged 7 commits intoflutter:masterfrom Mar 24, 2025
Merged
Add set semantics enabled API and wire iOS a11y bridge#161265auto-submit[bot] merged 7 commits intoflutter:masterfrom
auto-submit[bot] merged 7 commits intoflutter:masterfrom
Conversation
53c5a6a to
c601cac
Compare
80990ed to
1b9b5f1
Compare
cbracken
reviewed
Jan 10, 2025
Contributor
Author
sorry, forgot to add description. Done |
4123a4c to
fb23357
Compare
e4daa91 to
ffd43a5
Compare
goderbauer
reviewed
Feb 3, 2025
Member
goderbauer
left a comment
There was a problem hiding this comment.
LGTM for dart:ui (after doc nits are resolved)
| /// Informs the engine whether the framework is generating a semantics tree. | ||
| /// | ||
| /// Only framework knows when semantics tree should be generated. It uses this | ||
| /// method to notify the engine such event. |
Member
There was a problem hiding this comment.
Maybe better:
Suggested change
| /// method to notify the engine such event. | |
| /// method to notify the engine whether the framework will generate a semantics tree. |
0346c47 to
4428901
Compare
Contributor
|
@chunhtai heads up there are failures here if you hadn't seen. |
b3d00a8 to
0fee10f
Compare
cbracken
reviewed
Mar 17, 2025
Member
cbracken
left a comment
There was a problem hiding this comment.
Just a few small nits then good to go!
engine/src/flutter/shell/platform/darwin/ios/platform_view_ios_test.mm
Outdated
Show resolved
Hide resolved
0fee10f to
8ca0563
Compare
Contributor
|
autosubmit label was removed for flutter/flutter/161265, because - The status or check suite Mac_arm64 module_test_ios has failed. Please fix the issues identified (or deflake) before re-applying this label. |
chunhtai
added a commit
to chunhtai/flutter
that referenced
this pull request
Mar 25, 2025
…er#161265)" This reverts commit 26037df.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 25, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 25, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 27, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 27, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 27, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 27, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 27, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 27, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 28, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 28, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 28, 2025
9 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

fixes #158399
old pr flutter/engine#56691
previously the only correct way to enable semantics is that ios embedding receive signal from native OS, it call SetSemanticsEnabled to shell and then to dart to enable semantics tree generation.
If for some reason framework decide to enable semantics first, e.g. through SemanticsBinding.instance.ensureSemantics(typically due to integration test or ci that wants to test semantics), the update will be dropped in shell. Even if it later on receive signal from native OS to turn on semantics, it can't construct the complete accessibility tree in embedding because the updatesemantics sends diff update and previous updates are gone forever. It will end up in a broken state.
This pr changes so that the only source of truth will be in the framework side. When framework starts generating the the semantics tree, it will call SetSemanticsTreeEnabled through dart:ui, and the embedding needs to prepare itself to accept semantics update after receiving the message.
This however require some refactoring on iOS embedding because it will only create a11y bridge when receiving OS notification when assitive technologies turns on.
This requires three phase transition
add an empty dart:ui API setSemanticsTreeEnabled
makes framework calls the empty API.
merge this pr with actual implementation of setSemanticsTreeEnabled
I will do the android part in a separate pr
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.