Skip to content

Fix accessibility issues in Dropdown Menus #130

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

trcoffman
Copy link
Contributor

@trcoffman trcoffman commented Apr 16, 2025

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.

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.
@trcoffman
Copy link
Contributor Author

@dominicstop do you have time to take a look at this and merge it?

@dominicstop dominicstop merged commit 7c16385 into dominicstop:master Apr 23, 2025
@dominicstop
Copy link
Owner

hello! thank you for your contributimg to this library; i've merged your changes and released new patch: v3.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants