You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use the 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.
The text was updated successfully, but these errors were encountered:
When trying to use the 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()
andpopovertarget
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.
The text was updated successfully, but these errors were encountered: