[dialog] Declarative indicator for dialog modality
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 4.5k
- Forks
- 226
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 4
Description
The invokers proposal is a brilliant addition and really helps solve some of the developer ergonomic issues with dialogs (along with much more).
However, it misses one key case as I mentioned in https://github.com/whatwg/html/issues/3567, you can't have a modal dialog load open with just HTML, you need JS to call showModal() or a user to click an invoker button.
My use case is that I sometimes have modal dialogs that are linked to a client side router where the URL controls their visibility. I currently call .showModal() on component mount. But if I could instead just do this declaratively that would remove the requirement for client JS execution (think SSR scenarios)
<dialog open> works for non-modals but there's no equivalent for modal dialogs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading this issue and the linked discussion in whatwg/html#3567, then review the invokers proposal and the existing
and showModal() behaviors. Done means a standards-level declarative mechanism can represent a modal dialog's initial state, including SSR and URL-controlled visibility, without requiring client-side JavaScript.Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100