Open josepharhar opened 4 days ago
@westbrook I would assume there might be custom element needs for calling showPicker()
on <select>
without user activation, but I'm not sure what they would be. Can you offer any input here?
Not specific to custom elements as much as UX in general... I could see wanting something like this for a "new document" page, where in the <select>
for type was open by default and then you could change the type from the same form control before completing the document settings.
Play out the above as a custom elements and JS... an interaction writes <new-document>
to the page with the dynamic import of its definition. The definition loads later (for reasons) but once upgraded, <new-document>
would like the <select>
for type open by default. Would the user interaction span all the way through to the upgrade step?
The larger context of "autofocusing" a decision that can be edited before submitting feels like something the move to a style-able <select>
specifically unlocks?
I've passed the request for use cases onto the WCCG, we'll see what others in this area might be looking for here.
My initial reaction is this feels wrong. Select is basically like a menu, and I don't really want code to be able to open a menu for me. Seems like it makes it too easy to get/prompt bad user input.
The Open UI Community Group just discussed select: use cases for opening the picker without user activation
, and agreed to the following:
RESOLVED: There are real world usecases for opening a picker using programmatic activation on a custom select
So we discussed this and two real world use cases were raised:
if a select was opened by default, wouldn't it need to be focused by default? Since any focus event outside of it should close it (we had this same discussion about auto popovers in general).
but if that would be special cased to handle not being focused by default / allow for focus to move around the document w/out auto-closing the popup, then... eh?
In this HTML issue we are trying to make the customizable select popover showable without user activation, which we currently need for WPTs. However, without non-testing use cases we will likely have a hard time making progress in this area.
Can anyone think of reasons they'd want to show the picker without user activation?