diff --git a/html/semantics/interactive-elements/the-dialog-element/dialog-active-document.html b/html/semantics/interactive-elements/the-dialog-element/dialog-active-document.html
new file mode 100644
index 00000000000000..d6eea38fa8a399
--- /dev/null
+++ b/html/semantics/interactive-elements/the-dialog-element/dialog-active-document.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html b/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
index 47612e759eaa49..652378e015b56d 100644
--- a/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
+++ b/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
@@ -181,8 +181,7 @@
doc.body.appendChild(d11);
this.add_cleanup(() => document.body.append(d11));
assert_false(d11.open);
- d11.showModal();
- assert_true(d11.open);
- this.add_cleanup(() => d11.close());
- }, "Although the document is not attached to any pages, showModal() should execute as normal.");
+ assert_throws_dom("INVALID_STATE_ERR", () => d11.showModal());
+ assert_false(d11.open);
+ }, "When the document is not attached to any pages, showModal() should throw.");
diff --git a/html/semantics/popovers/popover-active-document.html b/html/semantics/popovers/popover-active-document.html
new file mode 100644
index 00000000000000..6ad1142ed79c64
--- /dev/null
+++ b/html/semantics/popovers/popover-active-document.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+