Open artemtrusov-cengage opened 1 week ago
@artemtrusov-cengage We currently support disableAutoDismiss
so the user has to manually close them themselves, but are you requesting a way to programmatically close an open Toast so that engineers can close them when a new window is opened?
@silvalaura Yes, we need a way for engineers to programmatically close an open toast. Currently, we support disableAutoDismiss, which requires users to close the toasts manually. However, it would be beneficial to have the capability to automatically close a toast when a new window is opened.
@orion-cengage Any accessibility concerns about supporting this?
Yeah probably. I would recommend they run this by Perkins or the Cengage a11y team before we do anything to the component for this. So many ways this could be handled without toasts.
The toaster component can automatically disappear after a certain time. During development, we ran into a problem because we have two places where we use the toaster: one on the main page and one in a modal window. The issue is that when the toaster shows up in one window and doesn’t close in time, if we open the other window, the timer resets, and the toaster appears again in the second window with a new timer. This keeps happening when we switch between the windows.
To fix this, we need the option to manually close the toaster so that we can dismiss it when one of the windows is closed.