-
Notifications
You must be signed in to change notification settings - Fork 287
Description
Is your feature request related to a problem? Please describe.
I want to implement announceForAccessibility for Toasts since they're inherently not great for screenreader (i.e. TalkBack/VoiceOver). Because Toasts are global, I'd like to implement this globally, rather than having to rely on passing it every time I call on Toast.show.
Describe the solution you'd like
I would like onShow to provide me with the values the toast has, so that I can do something like:
<Toast onShow={({ text1, text2 }) => AccessibilityInfo.announceForAccessibility(text1 + '\n' + text2)} />So my suggestion is that onShow is changed to:
(props: {
type: string,
text1: string,
text2: string?
}) => voidand of course, this could probably be applied to onHide and onPress as well.
Describe alternatives you've considered
I could pass an onHide function on every Toast.show but I would like to implement this globally since all toasts will need it.