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
The intent to manage focus of a closing dialog is a good one. However, if
authors have a clear understanding of the process they should have the
ability to change the focus target on dialog.close().
A common example: a dialog created for the "confirm delete" action with
"confirm" and "cancel" buttons. Cancel can target the default element per
this spec (i.e., the "delete" button). Confirm would send focus to
body since the deleted item no longer exists. An author should have the
ability to override this behavior but programmatically setting focus could
introduce a race condition with the default behavior.
Possible solutions:
the addition of a dialog property, with an idref value, that will
override this behavior by targeting the specified element when present
provided the element exists and is connected to the dom.
an options object or flag passed to dialog.close() that overrides the
default behavior.
The text was updated successfully, but these errors were encountered:
The focusing the previously focused element step in dialog.close() is synchronous, and it should work across all implementations. So I don't think there's a race condition here?
Changing the default behaivour, ie not doing the steps is a different topic though.
The intent to manage focus of a closing dialog is a good one. However, if
authors have a clear understanding of the process they should have the
ability to change the focus target on dialog.close().
A common example: a dialog created for the "confirm delete" action with
"confirm" and "cancel" buttons. Cancel can target the default element per
this spec (i.e., the "delete" button). Confirm would send focus to
body since the deleted item no longer exists. An author should have the
ability to override this behavior but programmatically setting focus could
introduce a race condition with the default behavior.
Possible solutions:
override this behavior by targeting the specified element when present
provided the element exists and is connected to the dom.
default behavior.
The text was updated successfully, but these errors were encountered: