Accessibility state treated incorrectly on iOS
Đang mở
@blakef đang làm issue này rồi.
Từ ngày 12/7/2024.
Accessibility
Help Wanted :octocat:
Issue: Author Provided Repro
Platform: iOS
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
I'm seeing two strange behaviours around the disabled property and accessibilitState.disabled on iOS:
- Setting disabled={true} on a TouchableOpacity leads to Voiceover reading the label of the touchable opacity followed by "link"
- Even if you set role="button" and accessibilityRole="button", VoiceOver will still read out " link button"
- In the example I've included you can see once you bump the counter up and the minus button is no longer disabled, it stops getting read out as a link
- Whatever is set for accessibilityState.disabled is never read out. Other properties, like accessibilityState.selected are still read out
Both of these issues happen on iOS (I'm including a snack, my iOS version is 17.5.1 - I've not tested this on other iOS versions), but TalkBack correctly reads out the button role and accessibilityState.
Steps to reproduce
- Create a and assign it a button role and accessibilityRole
- Set disabled={true} on it and accessibilityState={{disabled: true}}
- Turn on VoiceOver and focus on the TouchableOpacity
Expected behaviour
- The TouchableOpacity's is read out as " button disabled"
Actual behaviour
- The TouchableOpacity is read out as " link button"
- "disabled" is never read out
- Removing disabled={true} leads to the component no longer being read out as a link
React Native Version
0.74.0
Affected Platforms
Runtime - iOS
Output of npx react-native info
Not applicable as developing directly in Expo Snack
Stacktrace or Logs
Not applicable as developing directly in Expo Snack
Reproducer
https://snack.expo.dev/_f-0w64MnvIqQ65myDxPW
Screenshots and Videos
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.