Skip to content
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

accessibilityLabel error #143

Closed
kadir-akbulut opened this issue Apr 2, 2020 · 9 comments
Closed

accessibilityLabel error #143

kadir-akbulut opened this issue Apr 2, 2020 · 9 comments

Comments

@kadir-akbulut
Copy link

kadir-akbulut commented Apr 2, 2020

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
error_android

@kadir-akbulut
Copy link
Author

kadir-akbulut commented Apr 2, 2020

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 style={{ paddingHorizontal: 10 }}>
{options}



<View style={[styles.cancelContainer, this.props.cancelContainerStyle]}>

<View style={[styles.cancelStyle, this.props.cancelStyle]}>
<Text style={[styles.cancelTextStyle, this.props.cancelTextStyle]}>{this.props.cancelText}




);

removed

@peacechen
Copy link
Owner

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.

@peacechen
Copy link
Owner

This has been fixed and published in 2.0.2.

@bbaoNg97
Copy link

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

@lrphael
Copy link

lrphael commented Jan 24, 2021

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

The same to me. Working.

@guptanisha
Copy link

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.

@peacechen
Copy link
Owner

peacechen commented Jul 5, 2021

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.

@guptanisha
Copy link

@peacechen
Copy link
Owner

Should importantForAccessibility be set on all child components? Please submit a PR with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants