[wpt-sync] Sync PR 42068 - selectlist: Implement new keyboard behavior
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox121 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 42068 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/42068
Details from upstream follow.
Joey Arhar <jarhar@chromium.org> wrote:
selectlist: Implement new keyboard behavior
This patch implements several keyboard behaviors:
- Enter while the listbox is closed should not open the listbox and
should instead submit the form.- Enter while the listbox is open should select/commit the currently
focused option and close the listbox.- Space should open the listbox.
- Arrow keys while the listbox is open should not commit the newly
focused value.- Arrow keys while the listbox is closed should open the listbox.
These were resolved on in OpenUI here:
- https://github.com/openui/open-ui/issues/433#issuecomment-1452461404
- https://github.com/openui/open-ui/issues/386#issuecomment-1452469497
- https://github.com/openui/open-ui/issues/742
This patch also implements the resolution here to stop changing the
visible value of the selected option while the user is switching the
focused option using the arrow keys:Fixed: 1422275
Change-Id: If5e7328ad739f9c7339dcd17561c57875d4255e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4876791
Commit-Queue: Joey Arhar \<jarhar@chromium.org>
Reviewed-by: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1207785}
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests and 3 subtests
Status Summary
Firefox
OK : 2
PASS : 1
FAIL : 11
ERROR : 1
NOTRUN: 7
Chrome
OK : 2
PASS : 5
FAIL : 7
ERROR : 1
NOTRUN: 7
Safari
OK : 2
PASS : 1
FAIL : 11
ERROR : 1
NOTRUN: 7
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/forms/the-selectlist-element/selectlist-events.tentative.html [wpt.fyi]
- Button controller code should not run if the click event is preventDefaulted.:
FAIL(Chrome:PASS, Safari:FAIL) - Listbox controller code should not run if the click event is preventDefaulted.:
FAIL(Chrome:PASS, Safari:FAIL) - <selectlist> should fire input and change events when new option is selected.:
FAIL(Chrome:FAIL, Safari:FAIL) - <selectlist> should fire input and change events even when new selected option has the same value as the old.:
FAIL(Chrome:FAIL, Safari:FAIL) - <selectlist> should fire input and change events when option in listbox is clicked:
FAIL(Chrome:PASS, Safari:FAIL) - Check that <Space> opens <selectlist>.:
FAIL(Chrome:FAIL, Safari:FAIL) - Check that <Space> opens <selectlist> when <selectlist> specifies tabindex:
FAIL(Chrome:FAIL, Safari:FAIL) - Test that <selectlist> button slot receives key events.:
FAIL(Chrome:FAIL, Safari:FAIL)
- Button controller code should not run if the click event is preventDefaulted.:
- /html/semantics/forms/the-selectlist-element/selectlist-keyboard-behavior.tentative.html [wpt.fyi]:
ERROR(Chrome:ERROR, Safari:ERROR)- defaultbutton: When the listbox is closed, spacebar should open the listbox.:
FAIL(Chrome:PASS, Safari:FAIL) - defaultbutton: When the listbox is closed, all arrow keys should open the listbox.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - defaultbutton: When the listbox is closed, the enter key should submit the form or do nothing.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - defaultbutton: When the listbox is open, the enter key should commit the selected option.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - custombutton: When the listbox is closed, spacebar should open the listbox.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - custombutton: When the listbox is closed, all arrow keys should open the listbox.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - custombutton: When the listbox is closed, the enter key should submit the form or do nothing.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN) - custombutton: When the listbox is open, the enter key should commit the selected option.:
NOTRUN(Chrome:NOTRUN, Safari:NOTRUN)
- defaultbutton: When the listbox is closed, spacebar should open the listbox.:
- /html/semantics/forms/the-selectlist-element/selectlist-keyboard.tentative.html [wpt.fyi]
- Validate Enter, Up/Down Arrow, and Space keyboard accessibility support for <selectlist>:
FAIL(Chrome:FAIL, Safari:FAIL) - Validate Enter, Up/Down Arrow keyboard accessibility support for disabled <selectlist>:
FAIL(Chrome:FAIL, Safari:FAIL)
- Validate Enter, Up/Down Arrow, and Space keyboard accessibility support for <selectlist>:
Comment 4•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ffe5b326db40
https://hg.mozilla.org/mozilla-central/rev/e2b0f87ab2fa
Description
•