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

Remove focus ring for mouse clicks on buttons, text links, menu items and menu collapsibles #18

Open
uxkai opened this issue Oct 8, 2024 · 0 comments

Comments

@uxkai
Copy link

uxkai commented Oct 8, 2024

Description:

I would like to propose an adjustment to the visibility of the focus ring for mouse clicks on our UI elements that don't require any user input, like buttons and menu items. Currently, the focus ring is visible when these elements are clicked with the mouse, which may not provide the best user experience for all users.

Note: I also noticed the behavior described below in all Tailwind UI examples on their website.

Proposed changes:

Remove focus ring for mouse clicks on buttons, text links, menu items, and menu collapsibles:
   - Make the focus ring for these elements visible only when navigating with the keyboard (i.e., when using the Tab key). This can be achieved by utilizing the focus-visible class from Tailwind CSS.

Keep focus ring visible for mouse clicks on elements that require user input:
   - This behavior is currently already in place: Maintain the focus ring visibility for mouse clicks on elements that require user input: text inputs, text areas, select elements, toggles, checkboxes, and radio buttons. Of course, the focus ring also remains crucial for users navigating with the keyboard.

Benefits:

  • Improved user experience: Keyboard users will still have clear visual feedback, while mouse users won't see the focus ring unnecessarily, resulting in a cleaner interface.
  • Enhanced accessibility: Ensuring focus indicators for input fields keeps the application accessible to all users.

Next steps:

  • Implement the focus-visible class on buttons, text links, menu items, and menu collapsibles.
  • Test the changes across various browsers to ensure consistent behavior.
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

1 participant