testing-library / testing-library/user-event
User keyboard events don't trigger the <details /> element
Open
Nobody has claimed this yet.
bug
needs assessment
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction example
https://codesandbox.io/p/sandbox/still-sound-xhs3hn
Prerequisites
- Render the
detailsandsummaryelement with collapsible content - Focus the
summaryelement user.keyboard('[Enter]')oruser.keyboard('[Space]')should triggerdetailsto be open
Expected behavior
user.keyboard('[Enter]') or user.keyboard('[Space]') should trigger details to be open
Actual behavior
user.keyboard('[Enter]') or user.keyboard('[Space]') does NOT details to be open
User-event version
14.5.1
Environment
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked CodeSandbox reproduction and inspect the user.keyboard('[Enter]') and user.keyboard('[Space]') paths described in the issue. Done means focusing a summary element and using either key opens its details element, with coverage for both keyboard inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100