question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accessibility: Picker doesn't open when Talkback is activated

See original GitHub issue

Describe the bug

When the Talkback (VoicerOver on iOS) is activated, the Picker vocalize the “accessibilityLabel” but doesn’t open on double-tap. If I specify useNativeAndroidPickerStyle={true} it works but I lose my specific design. With useNativeAndroidPickerStyle={false} it doesn’t work.

To Reproduce

Activate Talkback on Android

Expected behavior
To open as usual.

Screenshots
n/a

Additional details
Device: [Pixel 4a API 30] OS: [Android 11] react-native-picker-select version: [8.0.3] “react”: “16.13.1”, “react-native”: “0.63.4”,

Reproduction and/or code sample

type Props = {
  Icon?: RNPickerSelect["props"]["Icon"];
  items: RNPickerSelect["props"]["items"];
  value: RNPickerSelect["props"]["value"];
  disabled?: RNPickerSelect["props"]["disabled"];
  placeholder?: RNPickerSelect["props"]["placeholder"];
  onValueChange: RNPickerSelect["props"]["onValueChange"];
  useNativeAndroidPickerStyle?: RNPickerSelect["props"]["useNativeAndroidPickerStyle"];
  touchableWrapperProps?: RNPickerSelect["props"]["touchableWrapperProps"];
} & PickerProps;

export type PickerSelect = ReturnType<typeof PickerSelect>;
export const PickerSelect = ({
  Icon,
  items,
  value,
  onValueChange,
  disabled = false,
  placeholder = {},
  useNativeAndroidPickerStyle = false,
  touchableWrapperProps = {}
}: Props): ReactElement<Props> => (
  <PickerSelect
    items={items}
    value={value}
    disabled={disabled}
    placeholder={placeholder}
    onValueChange={onValueChange}
    useNativeAndroidPickerStyle={false} // not working
    useNativeAndroidPickerStyle={true} // working

    Icon={() => <Image ... />
    }
    touchableWrapperProps={{
        accessible: true,
        accessibilityLabel: "Select",
        accessibilityHint: "Double tap to select an option.",
        accessibilityRole: "combobox"}}
    pickerProps={{
        accessible: true,
        accessibilityLabel: "Select", }}
  />
);

Do you know any workaround? Thanks in advance.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
satya-imagineacommented, Mar 18, 2022

I am also facing the same issue 😦

1reaction
TimDorandcommented, Jul 2, 2021

I have tried updating from

    "react-native-picker-select": "6.6.0",

to

    "react-native-picker-select": "8.0.3",

Also I’ve tried several implementations but none have worked so far.

    touchableWrapperProps={{
        accessible: true,
        accessibilityLabel: "Select",
        accessibilityHint: "Double tap to select an option.",
        accessibilityRole: "combobox"}}
    pickerProps={{
        accessible: true,
        accessibilityLabel: "Select", }}

While TalkBack activated, the “accessibilityLabel” is read but the Picker does not open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Language Selector Dropdown on Experience Builder ...
Observe that Talkback announces that this dropdown is "disabled." ... Observe that the dropdown does not open and nothing seems to happen.
Read more >
Talkback doesn't announce 'press select to activate' for a Button
We are aware that TalkBack's initial focus in dialogs isn't always optimal, but since TalkBack does it, it should be consistent across apps....
Read more >
Turn TalkBack on or off - Android Accessibility Help
On your device, open Settings . Select Accessibility and then TalkBack. Turn Use TalkBack on or off. Select Ok. Things to be aware...
Read more >
TalkBack - Accessibility on Android - YouTube
In this episode, learn about TalkBack, the Google screen reader, and how you can use it to improve the Accessibility of your app....
Read more >
Android Accessibility Properties and TalkBack - Level Access
If the control is a toggle button, TalkBack announces a role of “Switch” instead of “Button” to indicate that activating this control will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found