Fix accessibility issues in Dropdown Menus #130
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To VoiceOver, the dropdown menu trigger button is just read out as 'button'.
This is because by default, a UIButton has isAccessibilityElement=true. This means that everything inside of it is invisible to the screen reader.
In order to improve accessibility, it's necessary to set isAccessibilityElement to false so that the screen reader can access the react native component that the user has provided to be the trigger button for the context menu.
Here are some videos showing the VoiceOver experience before & after my change:
Before:
https://github.com/user-attachments/assets/01930ffb-1834-45cd-b65e-38f16cc5dc9f
After:
https://github.com/user-attachments/assets/68d8a0a1-2ed2-4f97-ba8f-b3e44f79ac17
QA Notes
I was unable to build the example app in this project, so I used the Zeego example app which depends on this project to test this change.