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

[BUG] - Pressing ESC doesn't clear input value #4850

Open
peter-neumann-dev opened this issue Feb 17, 2025 · 2 comments · May be fixed by #4892
Open

[BUG] - Pressing ESC doesn't clear input value #4850

peter-neumann-dev opened this issue Feb 17, 2025 · 2 comments · May be fixed by #4892
Assignees
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working

Comments

@peter-neumann-dev
Copy link

HeroUI Version

@heroui/[email protected]

Describe the bug

The clear button within input fields is not keyboard accessible. This behavior prevents keyboard users from accessing the clear functionality of the input field. Pressing the ESC key should clear the input value.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Navigate to the documentation page at https://www.heroui.com/docs/components/input#clear-button
  2. Enter text into the input field
  3. Press ESC key
  4. Input is not cleared

Expected behavior

  • Clear button should not be focusable (confirmed by specifications)
  • ESC key should clear the input value

See:
React Spectrum SearchField Documentation
MDN Input Search Documentation

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented Feb 17, 2025

@wingkwong wingkwong changed the title [BUG] - Clear Button of Input is not Accessible [BUG] - Pressing ESC doesn't clear input value Feb 17, 2025
@wingkwong wingkwong added 🐛 Type: Bug Something isn't working 📦 Scope : Components Related to the components labels Feb 17, 2025
@linyonglu
Copy link

I'll handle this bug.

linyonglu added a commit to linyonglu/heroui that referenced this issue Feb 21, 2025
Solve Pressing ESC doesn't clear input value
@linyonglu linyonglu linked a pull request Feb 21, 2025 that will close this issue
linyonglu added a commit to linyonglu/heroui that referenced this issue Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope : Components Related to the components 🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants