[csswg-drafts] Declarative dialog or styling non-modal backdrop (#10219)

mantissa7 has just created a new issue for https://github.com/w3c/csswg-drafts:

== Declarative dialog or styling non-modal backdrop ==
When trying to use the <dialog/> element declaratively with the `open` attribute, the dialog is created as a "non-modal", with no ::backdrop selector. However, the UA-styled backdrop is still shown. 

I am unsure of the background to the decision for this but only having an imperative JS method to show a HTML modal impacts zero-js or sites whose users have JS disabled. It also feels unnecessary, especially with things like `CSS toggle()` and `popovertarget` allowing basic state-changes without JS. 

An example I could think of could be a paywall news site that returns html with a modal covering the screen asking to subscribe, without wanting to wait for the client side to activate the modal.

Perhaps something like `<dialog open modal />` could solve this. Otherwise it should at least be possible to style the default UA ::backdrop element when using `<dialog open>` without JS.

Apologies if I'm missing anything or have overlooked something. The w3c github org is rather daunting being so massive.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10219 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 16 April 2024 18:53:16 UTC