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] - Clear Button of Input is not accessible #4845

Closed
peter-neumann-dev opened this issue Feb 16, 2025 · 5 comments
Closed

[BUG] - Clear Button of Input is not accessible #4845

peter-neumann-dev opened this issue Feb 16, 2025 · 5 comments

Comments

@peter-neumann-dev
Copy link

HeroUI Version

@heroui/[email protected]

Describe the bug

The clear button of inputs is not accessible (tabIndex: -1). Maybe introduced with this commit: 606f757

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Go to the docs: https://www.heroui.com/docs/components/input#clear-button
  2. Fill the input
  3. Use tab key to try to access the clear button
  4. It will jump to the next interactive element, skipping the clear button

Expected behavior

The clear button is accessible if the input is not disabled

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented Feb 16, 2025

@wingkwong
Copy link
Member

This is by design. The clear button will not be focusable no matter it is disabled or not.

ref:

https://react-spectrum.adobe.com/react-aria/SearchField.html
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search

@wingkwong wingkwong closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2025
@peter-neumann-dev
Copy link
Author

@wingkwong Thank you for your fast reply. If I understand the linked refs correctly, it should clear when hitting ESC, but this is not working as well. 😊

@wingkwong
Copy link
Member

The ref link only shows you the clear button shouldn't be focused only. For hitting ESC not clearing the value, you may create a new issue.

@peter-neumann-dev
Copy link
Author

Created a new issue #4850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants