Closed kadir-akbulut closed 4 years ago
It works when the value is not set.
<Overlay {...overlayProps}> <View style={[styles.overlayStyle, this.props.overlayStyle]}> <View style={[styles.optionContainer, this.props.optionContainerStyle]}>
</View>
<View style={[styles.cancelContainer, this.props.cancelContainerStyle]}>
<TouchableOpacity onPress={this.close} activeOpacity={this.props.touchableActiveOpacity} accessible={this.props.cancelButtonAccessible}>
<View style={[styles.cancelStyle, this.props.cancelStyle]}>
<Text style={[styles.cancelTextStyle, this.props.cancelTextStyle]}>{this.props.cancelText}</Text>
</View>
</TouchableOpacity>
</View>
</View>
</Overlay>);
The error says that it's receiving a boolean but is expecting a string. The documentation says that the prop type is a string: https://reactnative.dev/docs/accessibility
Try passing in empty strings for both scrollViewAccessibilityLabel and cancelButtonAccessibilityLabel.
If that works, the defaults will need to be fixed. Would you mind testing this out --
In your node_modules/react-native-modal-selector/index.js
, change the lines at:
https://github.com/peacechen/react-native-modal-selector/blob/master/index.js#L118
... so that the default values are strings ""
instead of undefined
. Remove the accessibility props you passed in earlier and see if it works the same.
This has been fixed and published in 2.0.2.
im not sure why when i updated to latest version (2.0.3), it still showing the same error (importantForAccessibility), but then when i change value importantForAccessibility
to "yes" in node_modules/react-native-modal-selector/index.js
, it success,
but the most funny part is when i change it back, the error is gone already and works successfully
im not sure why when i updated to latest version (2.0.3), it still showing the same error (importantForAccessibility), but then when i change value
importantForAccessibility
to "yes" innode_modules/react-native-modal-selector/index.js
, it success, but the most funny part is when i change it back, the error is gone already and works successfully
The same to me. Working.
This has been fixed and published in 2.0.2.
Though it has been closed almost a year @peacechen. I didn't work for React Native 0.63(https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz), react-native-modal-selector "^2.0.3" nor with 2.0.2
Please help suggest.
Maybe the requirements for importantForAccessibility
changed in later versions of RN. Looks like RN 0.63 was release July 2020 which was after RNMS 2.0.2. Would appreciate some help looking up the newer requirements for importantForAccessibility
.
Should importantForAccessibility
be set on all child components? Please submit a PR with the fix.
Hi, importantForAccessibility error importantForAccessibility = {isFirstItem? 'yes': 'no'}.I solved it with But this time it gives accessibilityLabel error. Please can you help? This problem is happening at 0.62. Android