-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Adding setLabeledBy to style. In android we would pass a view, but i think working with tags makes more sense (?) Im happy to hear any other feedback about how better to implement this. other improvement I see is just add the special labeledBy view tag id, so we wont override it with any other view ids if we would set somethign on it. (But if we are setting labeled by I would think they will know what they are doing (?)) there are two methods: ``` public void setLabeledBy (View label) and public void setLabeledBy (View root, int virtualDescendantId) ``` As there is a workaround to set this using: ``` Text( text = "I'm a text", style = Style.onInitializeAccessibilityNodeInfo { event -> event.superDelegate.onInitializeAccessibilityNodeInfo( event.host, event.info) val parentView = event.host.parent as View if (placeholderText == null) { event.info.setLabeledBy(......) } } ) ``` I focused only on the first simplier method Reviewed By: zielinskimz Differential Revision: D65419674 fbshipit-source-id: 71519ba442cb9d7327ba7c47c72e31ff557d7ae3
- Loading branch information
1 parent
e679f09
commit bc0cb49
Showing
4 changed files
with
41 additions
and
0 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
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