Skip to content

Conversation

@mateusz1913
Copy link
Contributor

This PR adds missing accessibilityLabel and accessibilityHint props on iOS Picker component. The solution uses UIPickerViewAccessibilityDelegate which uses values from accessibilityLabel and accessibilityHint JS props.

closes #310

Attaching two recordings, one before fix and one after fix.
By default VoiceOver announces the text of selected picker item, then it announces "picker item", then it announces "adjustable" accessibilityRole, then it announces item's position in collection, e.g. 1 of 3. After that it announces default hint for swiping picker up or down to change selected item.
After fix, Voiceover will first announce the accessibilityLabel value, then the text of selected picker item, then it announces "picker item", then it announces "adjustable" accessibilityRole, then it announces item's position in collection, e.g. 1 of 3. After that it announces the accessibilityHint value followed by default hint for swiping picker up or down to change selected item.

Before:

310-before-fix.mp4

After:

310-after-fix.mp4

Copy link
Contributor

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Naturalclar Naturalclar merged commit ed2c679 into react-native-picker:master Sep 20, 2024
github-actions bot pushed a commit that referenced this pull request Sep 20, 2024
## [2.8.1](v2.8.0...v2.8.1) (2024-09-20)

### Bug Fixes

* **#310:** missing a11y label and hint props on iOS Picker ([#582](#582)) ([ed2c679](ed2c679)), closes [#310](#310)
@Naturalclar
Copy link
Contributor

🎉 This PR is included in version 2.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

accessibilityLabel for Picker not read by VoiceOver

2 participants