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

Add: Add accessibility instructions for screen readers #520

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ export default class RNPickerSelect extends PureComponent {
<View style={[defaultStyles.viewContainer, style.viewContainer]}>
<TouchableOpacity
testID="ios_touchable_wrapper"
accessibilityRole="combobox"
accessibilityHint="Double tap to open selector"
onPress={() => {
this.togglePicker(true);
}}
Expand All @@ -456,6 +458,7 @@ export default class RNPickerSelect extends PureComponent {
{...modalProps}
>
<TouchableOpacity
accessibilityElementsHidden
style={[defaultStyles.modalViewTop, style.modalViewTop]}
testID="ios_modal_top"
onPress={() => {
Expand Down Expand Up @@ -500,6 +503,10 @@ export default class RNPickerSelect extends PureComponent {
const Component = fixAndroidTouchableBug ? View : TouchableOpacity;
return (
<Component
accessibilityRole="combobox"
accessibilityHint="Double tap to open selector"
accessible
onAccessibilityTap={onOpen}
testID="android_touchable_wrapper"
onPress={onOpen}
activeOpacity={1}
Expand Down