Skip to content

feat: Add isFocusable to ToastOptions #1236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JulianSelman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant