diff --git a/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.html b/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.html
new file mode 100644
index 000000000000000..35bf5182ed37303
--- /dev/null
+++ b/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
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 5edff18614225d0..47612e759eaa499 100644
--- a/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
+++ b/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
@@ -161,11 +161,11 @@
assert_equals(topElement(), d11);
// Removing the open attribute and running through the showModal() algorithm
- // again should not promote d10 to the top.
+ // again should promote d10 to the top.
d10.removeAttribute("open");
assert_equals(topElement(), d11);
d10.showModal();
- assert_equals(topElement(), d11);
+ assert_equals(topElement(), d10);
// Closing d11 with close() should cause d10 to be the topmost element.
d11.close();