HIQaH! QaH! TAG!
I'm requesting a TAG review of "Modal Close Signals".
A common feature of modals (dialogs, context menus, pickers, etc.) is that they are designed to be easy to close, with a uniform platform-wide interaction mechanism for doing so. Typically, this is the Esc key on desktop platforms, and the back button on some mobile platforms (notably Android). Not all platforms have such close signals, but for those that do, reacting to them is challenging to do correctly with current web APIs.
The explainer for modal close signals outlines the problem space, and goes into depth on one specific solution: a ModalCloseWatcher class, which provides a platform-agnostic way for developers to intercept these close signals. However, it also notes an alternative of bundling close signal handling into higher-level modal/popup APIs.
We'd appreciate any early feedback you have on both the problem space and the solution space. What do you think of our analysis of the problem space? Do you think ModalCloseWatcher is a good idea, or should we bundle into a higher-level API, or is there a third path we're not considering? Do you agree with our analysis that, even if we don't expose a ModalCloseWatcher class as a web API, the spec and implementation infrastructure could build off of something like it under the covers?
Further details:
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue
HIQaH! QaH! TAG!
I'm requesting a TAG review of "Modal Close Signals".
A common feature of modals (dialogs, context menus, pickers, etc.) is that they are designed to be easy to close, with a uniform platform-wide interaction mechanism for doing so. Typically, this is the Esc key on desktop platforms, and the back button on some mobile platforms (notably Android). Not all platforms have such close signals, but for those that do, reacting to them is challenging to do correctly with current web APIs.
The explainer for modal close signals outlines the problem space, and goes into depth on one specific solution: a
ModalCloseWatcherclass, which provides a platform-agnostic way for developers to intercept these close signals. However, it also notes an alternative of bundling close signal handling into higher-level modal/popup APIs.We'd appreciate any early feedback you have on both the problem space and the solution space. What do you think of our analysis of the problem space? Do you think
ModalCloseWatcheris a good idea, or should we bundle into a higher-level API, or is there a third path we're not considering? Do you agree with our analysis that, even if we don't expose aModalCloseWatcherclass as a web API, the spec and implementation infrastructure could build off of something like it under the covers?Further details:
ModalCloseWatcherAPI vs. bundle into a higher-level API<dialog>is a bit more complicated than we thought, so that might impact the proposed<dialog>integration, and may cause other changes to the API out of a desire to keep symmetry with<dialog>: [Modals] you can, in fact, prevent the Esc key from closing <dialog> slightlyoff/history_api#13We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue