forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Opt-in a11y argument for iOS interop (#1350)
It's non-trivial to figure out if the UIKit content has any accessibility element in its subtree in a general case. In the same time interop UIViews can _taint_ the tree of SemanticsModifierNode merging its children and redirecting all accessibility input to interop UIView, missing all other data. This lead to unexpected situations, where Compose controls were inaccessible because they contained a native UIKit element inside. Add `accesibilityEnabled` argument to `UIKitView`/`UIKitViewController` APIs Don't set `interopView` semantics property unless `accesibilityEnabled` is true. Document the interaction thoroughly. ## Testing - InteropViewAndSemanticsConfigMerge: first button is not _tainted_ by UIKitView content and is possible to interact via a11y input. ## Release Notes ### Features - iOS - Added source-compatible `accessibilityEnabled: Boolean = true` argument to `UIKitView` and `UIKitViewController`. ## Note Additive API changes consequences are unclear for Kotlin/Native source sets. Should we do overloads with extra parameters as well? cc @igordmn
- Loading branch information
1 parent
83d0871
commit 0f2c1b6
Showing
2 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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