JedWatson / JedWatson/react-select

Enter should open/close select when it is focused

Open
#5,154 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Are you reporting a bug or runtime error?

https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-collapsible.html

According to a11y guidelines when the select control is focused it should be possible to open/close it by with Enter/Return key. Currently the Spacebar opens/closes select.

You can check this by yourself in this Code Sanbox example.

https://codesandbox.io/s/react-select-v5-sandbox-y5jtm

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the current keyboard behavior in the linked CodeSandbox and compare it with the WAI-ARIA listbox example. Trace the focused select's keyboard handling, starting with the existing Spacebar open/close behavior, and verify that Enter/Return opens and closes the control when the change is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.