-
Notifications
You must be signed in to change notification settings - Fork 671
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
Button Focus Indication #3658
Comments
I've also noticed that focus-visible is not working properly for buttons, and I believe it's due to a change in Tailwind 4. The following code works in Tailwind 3 but not in Tailwind 4: <button class="focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-500">Test</button> You can compare the behaviour here: IssueWhen the button is focused, both Solution:To make it work in Tailwind 4, we need to explicitly add |
Indeed, thanks for the report! It seems something has changed in the |
@benjamincanac in my experience it does not work with |
It works on the website because there is no |
Yes, I've removed the |
Description
In v3, we seem to have lost any focus indication on Buttons. This looks intentional as I see
focus:outline-hidden
on the base. For a11y and good keyboard navigation, it's best practice to have a visual indication of focus: https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#discernibleandpredictablekeyboardfocusIt seems we've taken a step backward from v2 in this regard. Was this intentional? Is the intent for users to add their own
focus-visible:*
classes via app config?The text was updated successfully, but these errors were encountered: