react-toastify
react-toastify copied to clipboard
feat: Add isFocusable to ToastOptions
Context
Currently, toasts will always be focusable, as they unconditionally set tabIndex to 0. If toasts have focusable elements inside them, it can be desirable to set the toast itself as unfocusable and enable focus on the contained elements (buttons, links, etc.) as well as the close box.
Changes
This change adds an optional boolean property to ToastOptions, isFocusable. If it is set to true (or is missing) then the toast will be focusable, as per existing behavior. If set to false then the toast will not be focusable.