Re: [w3ctag/design-reviews] Dispatching Toggle Events for Dialog open/close (Issue #1005)

@keithamus Perfect, thanks! It looks like the idea of unifying the `*open` and `*close` events into a single event started in @mfreed7's https://github.com/openui/open-ui/issues/607#issuecomment-1309330785 in 2022, with Mason echoing the concern here that "It takes more work to write the event handler" (although the potential confusion is gone in the current event design with `newState`). @domenic endorsed the unification with "I think it will be less work for some use cases, e.g. event handlers that mainly want to sync the state change with some other part of the page and thus would have to listen to both events anyway." @domenic, do you still think moving from `*open/*close` to `*toggle` event was the right choice?

As a personal, non-TAG, opinion I think https://w3ctag.github.io/design-principles/#consistency indicates that `dialog`, `details`, and `popover` should have the same set of event names for this purpose, even if they're not the most ergonomic set for the most common uses. We could try to switch all three over to the open/close event set (for which we'd need to file an issue in HTML rather than here), if removing an `if` statement justifies that work. Someone from the TAG will reply again if we develop any group opinions.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/1005#issuecomment-2455267170
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/1005/2455267170@github.com>

Received on Monday, 4 November 2024 17:13:58 UTC