You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in the PR from accessibility point of view if the action is destructible (or at least hard to revert) modal should not focus on the action button, but rather cancel/close (which happens right now I believe).
Confirmation modal by definition is meant to be used to confirm actions that may have irreversible consequences.
If action is neutral, or easy to undo, why have confirmation modal at all? Can't it be triggered immediately (instead of opening the modal)?
It would be nice if there was a way to set the focus on the confirm button when opening the modal so that users can press enter to confirm.
This should probably only happen if the confirm is positive (maybe it should focus on cancel if the action is negative). Here's how we do something similar in Juju Dashboard (though it only happens for "neutral" actions): https://github.com/canonical/juju-dashboard/blob/main/src/components/ConfirmationModal/ConfirmationModal.tsx#L23.
The text was updated successfully, but these errors were encountered: