You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch react-native-switch@2.0.0 for the project I'm working on.
While working in my RN code base, I was trying to make some accessibility enhancements for web specific to this Switch element. Specifically I wanted aria-checked to appear (by passing accessibilityChecked from my code) on the switch element in the DOM and have it display the correct value, true or false, based on the value of the switch. The only way I could figure out how to do this was to update the TouchableWithoutFeedback component to Pressable which allows for accessibility properties to be rendered in the DOM. I tested this on web, ios, and android and noticed everything worked and looked okay.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-switch@2.0.0
for the project I'm working on.While working in my RN code base, I was trying to make some accessibility enhancements for web specific to this Switch element. Specifically I wanted
aria-checked
to appear (by passingaccessibilityChecked
from my code) on the switch element in the DOM and have it display the correct value, true or false, based on the value of the switch. The only way I could figure out how to do this was to update theTouchableWithoutFeedback
component toPressable
which allows for accessibility properties to be rendered in the DOM. I tested this on web, ios, and android and noticed everything worked and looked okay.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: