Move the focus back to the previous focused element for dialog.close()
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: sefeng, Assigned: sefeng)
References
(Blocks 1 open bug)
Details
(Keywords: access, Whiteboard: , [wptsync upstream])
Attachments
(1 file)
Per discussion in https://github.com/whatwg/html/issues/5678, browser vendors agree that we should move the focus back to previously focused element upon dialog.close()
. This improves the a11y support of dialog, so that we can enable <dialog> in Release.
We'll start with By default, dialog.close() returns the focus to the previously focused element if the element is still focusable and within the viewport, otherwise move the focus to <body>;
(Web developers should be able to use the close
event to move the focus to a different element if they want)
Assignee | ||
Comment 1•3 years ago
|
||
This change is based on the agreement that browser vendors are maded
in https://github.com/whatwg/html/issues/5678, such that closing
<dialog> should move the focus to the previously focused element.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sefeng, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/130bfa532753 Move the focus to the previously focused element when <dialog> is closed r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28749 for changes under testing/web-platform/tests
Assignee | ||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Updated•11 months ago
|
Description
•