Brings accessibilityLabel into PickerAndroid
Summary: Hi! I found problem with accessibilityLabel on PickerAndroid. There's no value in content-desc attribute while accessibilityLabel is correct. I found that accessibilityLabel is not propagated into native components via native props. This PR brings accessibilityLabel for PickerAndroid. Without this solution my appium tests fails, for example: My code: ```jsx <Picker style={this.props.style} selectedValue={this.props.value} onValueChange={this.onChange} disabled={this.props.disabled} accessibilityLabel="select_wineType"> // Chilren </Picker> ``` ```sh ✖ Error: element (~select_wineType) still not visible after 5000ms ``` Because xml of this view is (look into content-desc of Spinner): ```xml <android.widget.Spinner index="0" text="" class="android.widget.Spinner" package="com.hello_github" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="true" long-clickable="false" password= Closes https://github.com/facebook/react-native/pull/8873 Differential Revision: D3831691 Pulled By: spicyj fbshipit-source-id: a494f22cb8be8cd6964981fe7ef7d9ff3773bcce
This commit is contained in:
parent
a31a2910a1
commit
efd8b10135
|
@ -107,6 +107,7 @@ class PickerAndroid extends React.Component {
|
|||
selected: this.state.initialSelectedIndex,
|
||||
testID: this.props.testID,
|
||||
style: [styles.pickerAndroid, this.props.style],
|
||||
accessibilityLabel: this.props.accessibilityLabel,
|
||||
};
|
||||
|
||||
return <Picker ref={REF_PICKER} {...nativeProps} />;
|
||||
|
|
Loading…
Reference in New Issue