web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
657 stars 170 forks source link

Button accessibility #115

Closed CodingItWrong closed 2 years ago

CodingItWrong commented 2 years ago

This PR makes some buttons in the app more accessible, by marking them as buttons for the sake of accessibility, and by providing text labels for them. The specific use case I'm working with is iOS Voice Control, which lets you tap items on the screen based on their name.

Voice Control provides a names overlay to make it easy to visualize what elements have which names. Before this PR the overlay shows:

image

Note that:

After this PR, the overlay shows:

image

Note that I haven't added accessibility to all components in the app, just the ones I have experience with from the app I'm using RN Paper in.

Thanks for the great library!

RichardLindhout commented 2 years ago

This is amazing!! I will accept this if it uses the /src/translations so it'll work across other languages too, could you add this?

CodingItWrong commented 2 years ago

Will do! I should have time in the morning.

CodingItWrong commented 2 years ago

@RichardLindhout OK, updated to use the translations API, and added values for US and GB English. As I don't know the other two languages, how should we proceed? TS won't build the app without those values. (I was able to test out the build locally by temporarily deleting those other language files.)

RichardLindhout commented 2 years ago

Released! Thanks a lot!

RichardLindhout commented 2 years ago

@RichardLindhout OK, updated to use the translations API, and added values for US and GB English. As I don't know the other two languages, how should we proceed? TS won't build the app without those values. (I was able to test out the build locally by temporarily deleting those other language files.)

Haha, thanks, I'm doing Google Translate for the Polish version since I don't know the language