Hey, thanks for the library first of all!
Running into a couple of issues on web:
-
AccessibilityInfo.isScreenReaderEnabled always returns true on web.
- This means toasts don't show up by default.
- I found two fixes:
- Set
preventScreenReaderFromHiding to true.
- Or, for web:
Object.assign(AccessibilityInfo, {isScreenReaderEnabled: () => Promise.resolve(false)}).
- Since screen reader detection is unreliable on web, a better default or web-specific handling for visibility would be great.
-
pointerEvents: 'box-none' doesn't work the same on web.
- On native, it lets touches pass through while children are touchable. On web, this doesn't happen.
- I got the toast to mostly work by wrapping it with a
View that had pointerEvents: 'none'.
- But, that messes up the dismiss button on the Toast itself (since nothing inside the wrapper is touchable now).
Would love to figure out a solution for these web compatibility problems. The main goals would be for toasts to be visible by default on web and for interactive elements within the toast (like dismiss buttons) to work correctly.
Thanks!
Hey, thanks for the library first of all!
Running into a couple of issues on web:
AccessibilityInfo.isScreenReaderEnabledalways returnstrueon web.preventScreenReaderFromHidingtotrue.Object.assign(AccessibilityInfo, {isScreenReaderEnabled: () => Promise.resolve(false)}).pointerEvents: 'box-none'doesn't work the same on web.Viewthat hadpointerEvents: 'none'.Would love to figure out a solution for these web compatibility problems. The main goals would be for toasts to be visible by default on web and for interactive elements within the toast (like dismiss buttons) to work correctly.
Thanks!