<dialog closedby>
The closedby HTML attribute for <dialog> sets which user actions close a dialog. For example, closedby="any" allows the dialog to be closed by clicking outside of it.
Modern Web Guidance
How Modern Web Guidance uses this feature
Enables declarative light dismiss on backdrop clicks and Escape key presses on <dialog> elements using closedby="any" and closedby="closerequest".
Recommended fallback strategy
For browsers lacking native closedby attribute support on <dialog>, implement a click listener on the dialog backdrop (::backdrop) and an Escape key handler to call dialog.close().
Community use cases (0)
No use cases submitted yet
Be the first developer to describe your production use case and shape browser priorities!