diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.html
new file mode 100644
index 000000000000..5c2e70f87a61
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
index 5edff1861422..47612e759eaa 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html
+++ b/testing/web-platform/tests/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();