Description
Multi-select popups have some variations for committing the chosen options and closing the picker:
- "OK" and "Cancel" buttons are both included in the popup.
- Activating an option does not commit it until the "OK" button is pressed.
- Pressing "OK" closes the picker and commits the selected options.
- Pressing "Cancel" does not commit anything, effectively reverting changes.
- This is how the native select multiple popup on android works.
- Only a close button is provided.
- Activating an option commits it immediately.
- Pressing the close button closes the picker, just like light dismiss by clicking/touching outside the picker.
- This is how the native select multiple popup on iOS works.
- No buttons provided.
- Activating an option commits it immediately.
- Picker can only be closed by light dismiss or clicking on the invoker button.
- This is how the select multiple popup in issues.chromium.org works (see the "OS" label on any bug)
Not providing any buttons would be the easiest to implement and standardize.
If we provide buttons automatically in the UA shadowroot of the select's picker, should we make it configurable to switch between option 1 and option 2? This would require more work.
In my opinion, implementing option 2 would be the best since it's not too hard to implement and customize and provides good defaults/affordances.
In my opinion, option 3 is the best because it ensure that light dismiss commits options, raises less questions to me about how to implement the accessibility mapping of the popup element, doesn't require us to implement and standardize additional buttons, and should still make it possible for authors to implement their own buttons if they want them.