diff --git a/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-new.html b/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-new.html
index e84167a24892c..0473209fa9df7 100644
--- a/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-new.html
+++ b/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-new.html
@@ -18,6 +18,8 @@
view-transition-name: dialog;
contain: layout;
+
+ outline: none;
}
#target::backdrop {
diff --git a/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-old.html b/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-old.html
index 672295cd3bd72..3634f65d8c99a 100644
--- a/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-old.html
+++ b/testing/web-platform/tests/css/css-view-transitions/dialog-in-top-layer-during-transition-old.html
@@ -18,6 +18,8 @@
view-transition-name: dialog;
contain: layout;
+
+ outline: none;
}
#target::backdrop {
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/backdrop-stacking-order.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/backdrop-stacking-order.html
index 57cc63aab4802..897f54a53fbae 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/backdrop-stacking-order.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/backdrop-stacking-order.html
@@ -6,6 +6,7 @@
padding: 0px;
border: none;
margin: 0px;
+ outline: none;
}
#bottom::backdrop {
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/child-sequential-focus.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/child-sequential-focus.html
new file mode 100644
index 0000000000000..1b4dd30230054
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/child-sequential-focus.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focus-shadow.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focus-shadow.html
index e9ea15516e271..7e5768542559a 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focus-shadow.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dialog-focus-shadow.html
@@ -9,21 +9,21 @@
We focus this one between each test, to ensure that for non-modal dialogs,
if there is no focus delegate, it stays focused (instead of causing focus to reset to the body).
-->
-Focus between tests
+Focus between tests
@@ -31,25 +31,25 @@
@@ -57,26 +57,26 @@
@@ -84,34 +84,34 @@
@@ -119,25 +119,25 @@
@@ -145,91 +145,91 @@
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 c511631f9fbb7..5edff18614225 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
@@ -116,7 +116,7 @@
d6.showModal();
this.add_cleanup(function() { d6.close(); });
assert_true(d6.open);
- assert_equals(document.activeElement, document.body);
+ assert_equals(document.activeElement, d6);
}, "opening dialog without focusable children");
test(function(){
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dont-share-style-to-top-layer-ref.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dont-share-style-to-top-layer-ref.html
index 535ac93560709..7e6112b3cee09 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dont-share-style-to-top-layer-ref.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/dont-share-style-to-top-layer-ref.html
@@ -1,5 +1,8 @@
Test that a non-top layer element doesn't share style with a top layer
element. The test passes if you see two boxes.
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/element-removed-from-top-layer-has-original-position.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/element-removed-from-top-layer-has-original-position.html
index d78051a9b3eec..0dead33163635 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/element-removed-from-top-layer-has-original-position.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/element-removed-from-top-layer-has-original-position.html
@@ -14,6 +14,7 @@
border: none;
padding: 0;
margin: 0;
+ outline: none;
}
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-contain-ancestor.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-contain-ancestor.html
index 98835cb795fb0..5ee64fc1d9e31 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-contain-ancestor.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-contain-ancestor.html
@@ -8,6 +8,9 @@
::backdrop {
display: none;
}
+#dialog {
+ outline: none;
+}
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-fo-ancestor.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-fo-ancestor.html
index fe625f1c9bfb4..2bc294be2fae1 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-fo-ancestor.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-fo-ancestor.html
@@ -8,6 +8,9 @@
::backdrop {
display: none;
}
+#dialog {
+ outline: none;
+}
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-transformed-ancestor.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-transformed-ancestor.html
index 58627443dae19..527d508252c15 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-transformed-ancestor.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-transformed-ancestor.html
@@ -8,6 +8,9 @@
::backdrop {
display: none;
}
+#dialog {
+ outline: none;
+}
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-will-change-ancestor.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-will-change-ancestor.html
index 14f4391e6bfbc..e9db7321cd703 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-will-change-ancestor.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/fixed-position-child-with-will-change-ancestor.html
@@ -8,6 +8,9 @@
::backdrop {
display: none;
}
+#dialog {
+ outline: none;
+}
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus.html
index 05f4069d78f57..61e3ddeaf23e6 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus.html
@@ -39,12 +39,15 @@
document.querySelector('#text').focus();
label = document.querySelector('label');
+ submit = document.querySelector('#submit');
label.focus();
- assert_equals(document.activeElement, document.querySelector('#submit'),
+ assert_equals(document.activeElement, submit,
'label.focus() should send focus to the target.');
await clickOn(label);
- assert_equals(document.activeElement, document.body,
- 'Clicking the label should be the same as clicking the document body.');
+ assert_not_equals(document.activeElement, label,
+ 'Clicking the label should not focus the label.');
+ assert_not_equals(document.activeElement, submit,
+ 'Clicking the label should not focus the submit input.');
}, 'Tests focusing of an inert label for a non-inert target.');
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html
index 56f31f3592497..74379f50e22c7 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html
@@ -7,6 +7,11 @@
+
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop.html
index a18af0d30ea45..55d7132f8cefa 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop.html
@@ -7,6 +7,7 @@
height: 100px;
width: 100px;
background: green;
+ outline: none;
}
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-generated-content.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-generated-content.html
index 86f43e52c2eb0..96b97f8ec3c49 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-generated-content.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-generated-content.html
@@ -11,6 +11,7 @@
height: 100px;
width: 100px;
background: green;
+ outline: none;
}
dialog::before {
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps.html
index 164b41459d176..6a2ad8c4a0a4e 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps.html
@@ -10,10 +10,10 @@
outerButton = document.getElementById('outer-button');
assert_equals(document.activeElement, outerButton);
- // Test that focus goes to body if the dialog has no focusable elements, including itself
+ // Test that focus goes to the dialog if the dialog has no focusable elements
var outerDialog = document.getElementById('outer-dialog');
outerDialog.showModal();
- assert_equals(document.activeElement, document.body);
+ assert_equals(document.activeElement, outerDialog);
// Test that an autofocus element in the dialog gets focus.
var dialog = document.getElementById('dialog');
diff --git a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html
index 10f6c69fbe188..0886c2cd2c2a0 100644
--- a/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html
+++ b/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html
@@ -14,7 +14,7 @@
This tests that a modal dialog's containing block is in the initial containing block and that it is unaffected by
ancestor elements with overflow or opacity.