Intent to Prototype: HTMLSelectElement showPicker()

109 views
Skip to first unread message

Luke

unread,
Sep 20, 2023, 11:34:33 AM9/20/23
to blin...@chromium.org

Contact emails

lukewa...@gmail.comlu...@warlow.dev

Explainer

https://github.com/whatwg/html/pull/9754

Specification

https://whatpr.org/html/9754/input.html#dom-select-showpicker

Summary

Developers have been asking for a way to programmatically open the option picker of a select element. See https://www.google.com/search?q=programmatically+open+select+site%3Astackoverflow.com This is currently impossible in almost every browser. Providing showPicker() gives developers a supported way to do this. Following the pattern of input.showPicker().



Blink component

Blink>Forms

Motivation

Developers have been asking for a way to programmatically open the option picker of a select element. See https://www.google.com/search?q=programmatically+open+select+site%3Astackoverflow.com This is currently impossible in almost every browser. Providing showPicker() gives developers a supported way to do this. Following the pattern of input.showPicker().



Initial public proposal

https://github.com/whatwg/html/issues/7957

Search tags

showPicker

TAG review

https://github.com/w3ctag/design-reviews/issues/900

TAG review status

Pending

Risks



Interoperability and Compatibility

For interoperability: This feature could end up not being implemented by all browsers, to mitigate this it's been filed as a HTML spec change with positions requested early to get everyone on board. For compatibility: this feature is specified and designed to give browsers flexibility in whether they display a picker, or how they display it. Developers cannot observe either of these. Having said that all browsers implement pickers for select.



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/886)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/258)

Web developers: No signals

Other signals:

Ergonomics

There should be no ergonomic risks with this API.



Activation

This is as simple an API as possible so should be easy for developers to make use of. It also follows the existing pattern from the HTMLInputElement.



Security

This API can only be used with activation inside of top level or same-origin frames. This should avoid any potential security issues. It also follows the existing pattern of HTMLInputElement showPicker()



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

No specific DevTools changes are required. This feature is treated like any other JS method.



Is this feature fully tested by web-platform-tests?

No

Flag name on chrome://flags

None

Finch feature name

HTMLSelectElementShowPicker

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1485010

Availability expectation

I expect this to be available in all browsers within 12 months of launch in Chrome.

Adoption expectation

Feature is considered a best practice for some use case within 12 months of reaching Web Platform baseline.

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

https://github.com/whatwg/html/issues/9757 - The spec (both input and select) may be updated to allow showPicker to focus a control where required for implementation. This is not required by blink and thus should have no impact.

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5111537299881984

This intent message was generated by Chrome Platform Status.

Luke Warlow

unread,
Sep 20, 2023, 11:42:47 AM9/20/23
to blin...@chromium.org

Contact emails

lukewa...@gmail.comlu...@warlow.dev

Explainer

https://github.com/whatwg/html/pull/9754

Specification

https://whatpr.org/html/9754/input.html#dom-select-showpicker

Summary

Developers have been asking for a way to programmatically open the option picker of a select element. See https://www.google.com/search?q=programmatically+open+select+site%3Astackoverflow.com This is currently impossible in almost every browser. Providing showPicker() gives developers a supported way to do this. Following the pattern of input.showPicker().



Blink component

Blink>Forms

Motivation

Developers have been asking for a way to programmatically open the option picker of a select element. See https://www.google.com/search?q=programmatically+open+select+site%3Astackoverflow.com This is currently impossible in almost every browser. Providing showPicker() gives developers a supported way to do this. Following the pattern of input.showPicker().



Initial public proposal

https://github.com/whatwg/html/issues/7957

Search tags

showPicker

TAG review

https://github.com/w3ctag/design-reviews/issues/900

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/886)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/258)

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

No specific DevTools changes are required. This feature is treated like any other JS method.



Is this feature fully tested by web-platform-tests?

No

Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None


Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1485010

Estimated milestones

No milestones specified



Reply all
Reply to author
Forward
0 new messages