Closed Bug 1858227 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42068 - selectlist: Implement new keyboard behavior

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
121 Branch
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:

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}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

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)
  • /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)
  • /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)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ffe5b326db40 [wpt PR 42068] - selectlist: Implement new keyboard behavior, a=testonly https://hg.mozilla.org/integration/autoland/rev/e2b0f87ab2fa [wpt PR 42068] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.