-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic #34371
Conversation
<details><summary>testing accessibilityLabelledBy with TextInput</summary> <p> https://user-images.githubusercontent.com/24992535/183593138-7ced1974-6a06-4f0f-822a-1ade1edc7212.mp4 </p> </details> <details><summary>testing accessibilityLabelledBy with Switch</summary> <p> ![Screen Shot 2022-08-09 at 15 53 37](https://user-images.githubusercontent.com/24992535/183596336-4b73186b-6d27-485e-a6ea-29a0f0b9ef50.png) </p> </details>
Base commit: ee33385 |
Base commit: 333ba59 |
@@ -211,6 +212,14 @@ class AccessibilityExample extends React.Component<{}> { | |||
value="Foo" | |||
/> | |||
</View> | |||
<View> | |||
<Text nativeID="formLabel4">Enable Fielld</Text> |
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.
Typo: Fielld
-> Field
Perhaps we want to put this in its own <RNTesterBlock>
, since it is a switch and doesn't act on the preceding fields (naming may be confusing). We could label this instead as a concrete example such as "Enable notifications", or more generically: "Switch example".
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.
Perhaps we want to put this in its own <RNTesterBlock>, since it is a switch and doesn't act on the preceding fields (naming may be confusing). We could label this instead as a concrete example such as "Enable notifications", or more generically: "Switch example". https://github.com/facebook/react-native/pull/34371/files#r942608407
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @fabriziobertoglio1987 in 9f43581. When will my fix make it into a release? | Upcoming Releases |
…mic (facebook#34371) Summary: `accessibilityLabelledBy` accepts String or Array type. - The JavaScript Array type corresponds to java [ReadableArray][3] ([HybridData][4]) - The JavaScript String type corresponds to the java String Use [DynamicFromObject][5] to parse String to Dynamic. https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java#L222-L228 All credits to [grgr-dkrk][1] (PR facebook#32470). fixes [https://github.com/facebook/react-native/issues/30846][2] ## Changelog [Android] [Fixed] - accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic Pull Request resolved: facebook#34371 Test Plan: <details><summary>testing accessibilityLabelledBy with TextInput</summary> <p> https://user-images.githubusercontent.com/24992535/183593138-7ced1974-6a06-4f0f-822a-1ade1edc7212.mp4 </p> </details> <details><summary>testing accessibilityLabelledBy with Switch</summary> <p> ![Screen Shot 2022-08-09 at 15 53 37](https://user-images.githubusercontent.com/24992535/183596336-4b73186b-6d27-485e-a6ea-29a0f0b9ef50.png) </p> </details> <details><summary>testing paper renderer after the fix</summary> <p> https://user-images.githubusercontent.com/24992535/183605619-01f1be64-788a-43bd-88b0-a7b2cad75148.mp4 </p> </details> [1]: https://github.com/grgr-dkrk [2]: facebook#30846 [3]: https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java#L1 [4]: https://github.com/facebookincubator/fbjni/blob/main/java/com/facebook/jni/HybridData.java [5]: https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromObject.java#L74 Reviewed By: lunaleaps Differential Revision: D38706360 Pulled By: huntie fbshipit-source-id: e4771552d3fddfad50f4d4cbbf971fe4a718e134
…mic (facebook#34371) Summary: `accessibilityLabelledBy` accepts String or Array type. - The JavaScript Array type corresponds to java [ReadableArray][3] ([HybridData][4]) - The JavaScript String type corresponds to the java String Use [DynamicFromObject][5] to parse String to Dynamic. https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java#L222-L228 All credits to [grgr-dkrk][1] (PR facebook#32470). fixes [https://github.com/facebook/react-native/issues/30846][2] ## Changelog [Android] [Fixed] - accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic Pull Request resolved: facebook#34371 Test Plan: <details><summary>testing accessibilityLabelledBy with TextInput</summary> <p> https://user-images.githubusercontent.com/24992535/183593138-7ced1974-6a06-4f0f-822a-1ade1edc7212.mp4 </p> </details> <details><summary>testing accessibilityLabelledBy with Switch</summary> <p> ![Screen Shot 2022-08-09 at 15 53 37](https://user-images.githubusercontent.com/24992535/183596336-4b73186b-6d27-485e-a6ea-29a0f0b9ef50.png) </p> </details> <details><summary>testing paper renderer after the fix</summary> <p> https://user-images.githubusercontent.com/24992535/183605619-01f1be64-788a-43bd-88b0-a7b2cad75148.mp4 </p> </details> [1]: https://github.com/grgr-dkrk [2]: facebook#30846 [3]: https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableArray.java#L1 [4]: https://github.com/facebookincubator/fbjni/blob/main/java/com/facebook/jni/HybridData.java [5]: https://github.com/facebook/react-native/blob/e509f96baf5e523301a5c9567c416508ff20d175/ReactAndroid/src/main/java/com/facebook/react/bridge/DynamicFromObject.java#L74 Reviewed By: lunaleaps Differential Revision: D38706360 Pulled By: huntie fbshipit-source-id: e4771552d3fddfad50f4d4cbbf971fe4a718e134
Summary
accessibilityLabelledBy
accepts String or Array type.Use DynamicFromObject to parse String to Dynamic.
react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java
Lines 222 to 228 in e509f96
All credits to grgr-dkrk (PR #32470). fixes #30846
Changelog
[Android] [Fixed] - accessibilityLabelledBy use DynamicFromObject to parse String to Dynamic
Test Plan
testing accessibilityLabelledBy with TextInput
2022-08-09.15-40-35.mp4
testing accessibilityLabelledBy with Switch
testing paper renderer after the fix
2022-08-09.16-42-58.mp4