From d4d463bc2b0cd13c30c796dadb5ed23b011927c1 Mon Sep 17 00:00:00 2001 From: Xiuli Shen Date: Wed, 8 May 2019 21:13:07 -0700 Subject: [PATCH] Revert accessibility textinput issue to see if it is the root cause of labels not showing up properly Summary: Reverting https://github.com/facebook/react-native/pull/24641/commits/cb7e26ab6a8c23da4073665d193e5da0f8131192 to see if this fixes the accessibility issue we are seeing in text inputs. Reviewed By: shergin Differential Revision: D15271883 fbshipit-source-id: e956f93af539e146ac5a7948fdae020c99a1301e --- Libraries/Text/TextInput/RCTBaseTextInputView.m | 7 +++++++ Libraries/Text/TextInput/RCTBaseTextInputViewManager.m | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index a6a15b37c39..d9b0d7310d8 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -505,6 +505,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) return fittingSize; } +#pragma mark - Accessibility + +- (UIView *)reactAccessibilityElement +{ + return self.backedTextInputView; +} + #pragma mark - Focus Control - (void)reactFocus diff --git a/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m b/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m index 63aa487492e..d226782be62 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m @@ -34,7 +34,6 @@ RCT_EXPORT_MODULE() #pragma mark - Unified properties -RCT_REMAP_VIEW_PROPERTY(accessibilityLabel, reactAccessibilityElement.accessibilityLabel, NSString) RCT_REMAP_VIEW_PROPERTY(autoCapitalize, backedTextInputView.autocapitalizationType, UITextAutocapitalizationType) RCT_REMAP_VIEW_PROPERTY(autoCorrect, backedTextInputView.autocorrectionType, UITextAutocorrectionType) RCT_REMAP_VIEW_PROPERTY(contextMenuHidden, backedTextInputView.contextMenuHidden, BOOL)