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

Correct VaSelect keyboard navigation #1783

Closed
m0ksem opened this issue May 16, 2022 · 5 comments
Closed

Correct VaSelect keyboard navigation #1783

m0ksem opened this issue May 16, 2022 · 5 comments
Assignees
Labels
BUG Something isn't working team discussion Feedback wanted
Milestone

Comments

@m0ksem
Copy link
Collaborator

m0ksem commented May 16, 2022

Enter usually used for submit action in form. I would rather just use space to open select. Pressing enter on any component could submit my form.

Also, up and down buttons often used not for dropdown opening, but switching between options without opening dropdown.

Originally posted by @m0ksem in #1778 (comment)

@m0ksem m0ksem added BUG Something isn't working team discussion Feedback wanted labels May 16, 2022
@m0ksem
Copy link
Collaborator Author

m0ksem commented May 16, 2022

Take a notice that VaTimePicker also must select option on space, instead of scroll.
http://localhost:8080/en/ui-elements/time-input#default

OR do we want to change space to enter? Not sure here...

@asvae
Copy link
Member

asvae commented May 17, 2022

Enter usually used for submit action in form

Regarding enter/space usage I think best idea would be to stick to vanilla behavior, as that could be something that user expects.

For vanilla select:

  • enter opens select and selects values
  • space only opens select

but switching between options without opening dropdown

Yeah. That's a good one, matter of convenience for selects with few options. We can definitely implement it.

Take a notice that VaTimePicker also must select option on space, instead of scroll.

A matter of convention. It might make sense not to close picker on enter (select does close).

@m0ksem
Copy link
Collaborator Author

m0ksem commented May 17, 2022

Let's use enter as select option action. Looks like selecting only with space, it is macOS only specific behavior.

More information can be found here: https://www.w3.org/TR/wai-aria-practices/#combobox-keyboard-interaction

@Derranion
Copy link
Member

I support this - UP and Down buttons to open dropdown seems a bit weird.

Take a notice that VaTimePicker also must select option on space, instead of scroll. http://localhost:8080/en/ui-elements/time-input#default

OR do we want to change space to enter? Not sure here...

Or we could add enter there as well :)

Enter usually used for submit action in form. I would rather just use space to open select. Pressing enter on any component could submit my form.

Also, up and down buttons often used not for dropdown opening, but switching between options without opening dropdown.

Originally posted by @m0ksem in #1778 (comment)

If depends on focus - if Select is focused enter will not submit form, not sure where this can cause issues.

Let's use enter as select option action. Looks like selecting only with space, it is macOS only specific behavior.

More information can be found here: https://www.w3.org/TR/wai-aria-practices/#combobox-keyboard-interaction

Yeah on windows it opens by "Enter" press.

@m0ksem m0ksem self-assigned this Jun 17, 2022
@m0ksem m0ksem added this to the 1.4.2 milestone Jun 17, 2022
@m0ksem
Copy link
Collaborator Author

m0ksem commented Jun 17, 2022

Since we support multiple select, it is suggested that UP and DOWN keys must open dropdown. So this issue probably need to be closed.

@m0ksem m0ksem closed this as completed Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working team discussion Feedback wanted
Projects
None yet
Development

No branches or pull requests

3 participants