Skip to content
New issue

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

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

Already on GitHub? # to your account

Dialog closedby attribute and requestClose() function #329

Closed
lukewarlow opened this issue Mar 7, 2024 · 6 comments
Closed

Dialog closedby attribute and requestClose() function #329

lukewarlow opened this issue Mar 7, 2024 · 6 comments
Assignees
Labels
position: support topic: html Spec relates to HTML (Hypertext Markup Language) venue: WHATWG HTML Workstream

Comments

@lukewarlow
Copy link
Member

lukewarlow commented Mar 7, 2024

WebKittens

No response

Title of the spec

Dialog light dismiss

URL to the spec

https://html.spec.whatwg.org/multipage

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

No response

Mozilla standards-positions issue URL

mozilla/standards-positions#998

WebKit Bugzilla URL

No response

Radar URL

No response

Description

This is a request for a WebKit standards position on the idea of adding (optional) light dismiss functionality to Dialogs.
See whatwg/html#9373 for the discussion. The current proposal is a new attribute closedby (naming TBD) with three values allowing no close bahaviour, close watcher behaviour, or close watcher and light dismiss behaviour.

@lukewarlow
Copy link
Member Author

Draft PR to give a rough idea of what this could look like whatwg/html#10157

@annevk
Copy link
Contributor

annevk commented Jun 17, 2024

It's rather unclear what the actual state of this proposal is. I take it whatwg/html#9373 (comment) is the current proposal still? I don't understand how people are now comfortable with changing the default. How does that reconcile with whatwg/html#9373 (comment)?

And if Esc somehow already closes dialogs or soon will be capable of closing all existing dialogs, why would we add a way to declaratively disable that again?

@lukewarlow
Copy link
Member Author

lukewarlow commented Jun 17, 2024

To clarify the default will be the existing behaviour. No change will happen until you add the attribute with a specific value. In html terms the missing value state will be an "auto" state with no corresponding keyword.

whatwg/html#10157 - here's a rought draft PR.

I will take a look at the stacking stuff not familiar enough to answer.

As for why to offer a way to disable it, well we need the mechanism to match existing behaviour for non-modal dialogs, and we may as well allow that for modal dialogs too? I believe Domenic may have mentioned that it's come up as a feature request too.

@lukewarlow
Copy link
Member Author

To update this the latest PR is at whatwg/html#10737

@miketaylr
Copy link

Note there is an Intent to Ship on blink-dev https://groups.google.com/a/chromium.org/g/blink-dev/c/_pIOAyg1_E0/m/DnkvfQLVDgAJ for this feature - whatwg/html#10737 is landed as https://html.spec.whatwg.org/#attr-dialog-closedby.

Now would be a good time to provide feedback (or a position one way or another), if any. cc @annevk

@annevk
Copy link
Contributor

annevk commented Jan 21, 2025

While colleagues and I were not happy with how this landed in the HTML standard as discussed in whatwg/html#10906, the feature itself seems reasonable. As such, I suggest we resolve this as "position: support" one week from now.

@lukewarlow lukewarlow added position: support and removed topic: accessibility Spec relates to accessibility labels Jan 30, 2025
@lukewarlow lukewarlow changed the title Dialog light dismiss Dialog closedby attribute and requestClose() function Jan 30, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
position: support topic: html Spec relates to HTML (Hypertext Markup Language) venue: WHATWG HTML Workstream
Projects
None yet
Development

No branches or pull requests

5 participants