Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select-only combobox Enter interaction diverges from native select #2998

Open
Mintoo200 opened this issue Apr 29, 2024 · 5 comments
Open

Select-only combobox Enter interaction diverges from native select #2998

Mintoo200 opened this issue Apr 29, 2024 · 5 comments
Assignees
Labels
editorial Changes to prose that don't alter intended meaning, e.g., phrasing, grammar. May fix inaccuracies. Inaccuracy Incorrect statement in prose (not a code bug) P3 Task force has identified as low priority at this time compared to other prioritized issues Pattern Page Related to a page documenting a Pattern

Comments

@Mintoo200
Copy link

The Select-only combobox example states that pressing Enter on a closed combobox should "Opens the listbox without moving focus or changing selection."

The combobox pattern page does not state any specific interaction on a closed combobox when pressing Enter.

What is bothering me is that the native HTML select does nothing when the user presses Enter when the select is not associated to a form (as demonstrated in this CodePen) and submits the form when associated to one as you'd expect from any kind of input.

Is there a reason to expect Enter to open the listbox ?

Thanks !

@Mintoo200
Copy link
Author

I realise this might be a question of how do you submit a form from a div. An implementation with requestSubmit might be an option ?

@juliebrunetto83
Copy link

Indeed, this is not the only interaction that differs from native select. Is there a reason for this?

@css-meeting-bot
Copy link
Member

The ARIA Authoring Practices (APG) Task Force just discussed Select-only combobox enter key behavior.

The full IRC log of that discussion <jugglinmike> Topic: Select-only combobox enter key behavior
<jugglinmike> github: https://github.com//issues/2998
<jugglinmike> Matt_King: this is another inconsistency within the APG and also an inconsistency with the native "select"
<jugglinmike> Matt_King: I don't know why we have the "enter" key expanding. Maybe it's because that's what menu buttons do
<jugglinmike> Matt_King: Do people think we should remove the "Enter to open" on the select-only combobox example?
<jugglinmike> Bryan_Garaventa: I've used that in the past
<jugglinmike> jongund: Enter has not been a past default action
<jugglinmike> Matt_King: Because our combobox is collapsed by default and because it's select-only, it has a lot of similarities with menu button
<jugglinmike> Matt_King: I have questions about the visual design of the select-only combobox
<jugglinmike> Matt_King: Does it look like a button? And can you click on a down-arrow icon to expand it? Or does it even have a down-arrow icon?
<jugglinmike> arigilmore: It has an arrow, but you can click anywhere on the box to open it
<jugglinmike> arigilmore: It's styled more like a button
<jugglinmike> Matt_King: So it looks more like a menu button than an input field
<jugglinmike> Matt_King: If you can click to expand it, then I'm thinking that pressing "enter" to expand it is analogous
<jugglinmike> Bryan_Garaventa: I would agree with that
<jugglinmike> Mark_McCarthy: Me too. As a keyboard user, it seems like it can't hurt
<jugglinmike> Matt_King: Okay, we'll stick with the "enter" key behavior and treat this as an editorial problem
<jugglinmike> Matt_King: We'll make a change to the text of the "keyboard" section of the combobox pattern

@mcking65 mcking65 added editorial Changes to prose that don't alter intended meaning, e.g., phrasing, grammar. May fix inaccuracies. Inaccuracy Incorrect statement in prose (not a code bug) Pattern Page Related to a page documenting a Pattern labels Jun 11, 2024
@mcking65 mcking65 self-assigned this Jun 11, 2024
@mcking65 mcking65 added the P3 Task force has identified as low priority at this time compared to other prioritized issues label Jun 11, 2024
@mcking65
Copy link
Contributor

Per discussion in today's meeting, the "Enter" key will be added as an option for expanding select-only comboboxes to the combobox pattern.

@Mintoo200
Copy link
Author

Hey, sorry to reopen this issue, just trying to understand. The select-only combobox does look like a menu button but it is used in a different context. This is basically an input type where, not only you can expand the dropdown list but, contrary to the menu, you need to keep track of the selected entry and handle it like you would a direct user input. It kinda feels weird not to expect the same features (in this case the whole "submit the form when pressing Enter").
Also, contrary to the menu button, this one will be announced as "combobox" to assistive technologies so the user might expect a different behaviour and different interactions.
Also also, given that both the native <select> and custom one will be announced as "combobox", the user wouldn't be aware that it is used in a different way, right?

Anyway, thanks for your feedback on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Changes to prose that don't alter intended meaning, e.g., phrasing, grammar. May fix inaccuracies. Inaccuracy Incorrect statement in prose (not a code bug) P3 Task force has identified as low priority at this time compared to other prioritized issues Pattern Page Related to a page documenting a Pattern
Development

No branches or pull requests

4 participants