Skip to content

Commit 3305dbd

Browse files
sefeng211moz-wptsync-bot
authored andcommitted
Implement the new dialog initial focus algorithm
The main changes of the new algorithm are * Make the dialog focusing steps look at sequentially focusable elements instead of any focusable element. * Make the dialog element itself get focus if it has the autofocus attribute set. * Make the dialog element itself get focus as a fallback instead of focus being "reset" to the body element. Spec PR (merged): whatwg/html#8199 Differential Revision: https://phabricator.services.mozilla.com/D181263 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1811129 gecko-commit: 94d3ff1570f4ef28436d580200a642fc1ab41883 gecko-reviewers: emilio
1 parent 5289db8 commit 3305dbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
background-color: rgb(0, 128, 0);
88
opacity: 0.5;
99
}
10+
dialog:focus {
11+
outline: none;
12+
}
1013
</style>
1114
<body>
1215
<dialog>Test passes if you see a green backdrop at half opacity.</dialog>

0 commit comments

Comments
 (0)