Configure accessibility and aria-live settings
mainHot-toast messages are announced via an aria-live region.
- Default behavior: The
politesetting is used by default. - Customization: You can change this by setting the
ariaLiveproperty within yourToastConfigorToastOptions.
Best Practices for Accessibility:
- Focus Management: Do not move the application focus to the hot-toast element, as this is disruptive. Instead, provide alternative ways (like keyboard shortcuts or menus) to perform actions offered within a toast.
- Actionable Toasts: If a toast contains an action, set
autoClose: false. This allows screen-reader users enough time to navigate to the element and activate the action.