From 12de605c12ba1b0058b22205afa30be6df628b58 Mon Sep 17 00:00:00 2001
From: Keith Cirkel button
, which is a bad user experience.
A dialog
element without an open
attribute
+ specified should not be shown to the user. This requirement may be implemented indirectly through
+ the style layer. For example, user agents that support the suggested
+ default rendering implement this requirement using the CSS rules described in the Rendering section.
Removing the open
attribute will usually hide the
+ dialog. However, doing so has a number of strange additional consequences:
+
+
The close
event will not be fired.
The close()
method, and any close requests, will no longer be able to close the dialog.
If the dialog was shown using its showModal()
+ method, the Document
will still be blocked.
For these reasons, it is generally better to never remove the open
attribute manually. Instead, use the close()
method to close the dialog, or the hidden
attribute to hide it.
The tabindex
attribute must not be specified on
+ dialog
elements.
The open
attribute
is a boolean attribute. When specified, it indicates that the dialog
element is active and that the user can interact with it.
dialog
was shown using its showModal()
method; otherwise the None state.
- A dialog
element without an open
attribute
- specified should not be shown to the user. This requirement may be implemented indirectly through
- the style layer. For example, user agents that support the suggested
- default rendering implement this requirement using the CSS rules described in the Rendering section.
Removing the open
attribute will usually hide the
- dialog. However, doing so has a number of strange additional consequences:
-
-
The close
event will not be fired.
The close()
method, and any close requests, will no longer be able to close the dialog.
If the dialog was shown using its showModal()
- method, the Document
will still be blocked.
For these reasons, it is generally better to never remove the open
attribute manually. Instead, use the close()
method to close the dialog, or the hidden
attribute to hide it.
The tabindex
attribute must not be specified on
- dialog
elements.
dialog.show()