Bug 1692730 [wpt PR 27623] - Introduce <selectmenu> with basic shadow structure and...
commit5e0b992eb507ae97e2b58849168e05dc350b2d09
authorDaniel Clark <daniec@microsoft.com>
Mon, 22 Feb 2021 21:53:46 +0000 (22 21:53 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 5 Mar 2021 16:17:31 +0000 (5 16:17 +0000)
tree07e29d372d5079ab79f91ffbda0fe1adb4651494
parente64a1ca8fdbabf9fa6cece942d1a833d9dd7f0b5
Bug 1692730 [wpt PR 27623] - Introduce <selectmenu> with basic shadow structure and some controller code, a=testonly

Automatic update from web-platform-tests
Introduce <selectmenu> with basic shadow structure and some controller code

Begin implementing the <selectmenu> element, a version of <select> with
a fully author-customizable UI.

See https://groups.google.com/u/1/a/chromium.org/g/blink-dev/c/9TcfjaOs5zg/m/WAiv6WpUAAAJ
and associated links for additional context.

Establish the basic shadow DOM structure, with a button (which
includes an arrow icon and a container to show the value), and
a listbox based on <popup>.  There are <slot> elements to add
<option>s to the popup and replace any of the default parts.

Include some basic styles. The default button part looks something
like the native <select>, but the default listbox will need more
work to improve its appearance.

Add basic controller code using NativeEventListeners. Clicking
the button part opens the listbox <popup>, and the value property
and text shown in the button are updated when an option is clicked.
This controller code is applied to the default parts and to
author-supplied parts that are included via the <slot>s.

Add tests to validate some basic scenarios involving the
controller code. Note, a couple of the
selectmenu-value.tentative.html
tests fail because updates to the value property are not yet
synchronous (should they be?).

There are many TODOs and open questions to investigate, but
this change establishes a starting point for exploring
an approach to customizable form controls.

Bug: 1121840
Change-Id: I68c0513b0e30813cbaa3b69fc2acb9086c7400ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2693857
Commit-Queue: Dan Clark <daniec@microsoft.com>
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Ionel Popescu <iopopesc@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#855581}

--

wpt-commits: 6ba9b6bb71afb574b48982a6bffee37051b833f6
wpt-pr: 27623
testing/web-platform/tests/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html [new file with mode: 0644]
testing/web-platform/tests/html/semantics/forms/the-selectmenu-element/selectmenu-value.tentative.html [new file with mode: 0644]