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