-
Notifications
You must be signed in to change notification settings - Fork 272
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
New focus handling behaviour #8250
Comments
This was referenced Feb 12, 2024
1 task
Internal BLI created: BGSOFUIRILA-3812 |
Internal Reference: BGSOFUIPIRIN-6469 |
This was referenced Feb 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request Description
According to the latest visual and interaction designs, the focus should behave like this:
Input elements remain unchanged - they always show focus as additional attention is needed.
To be clarified:
Proposed Solution
A pure CSS solution is possible by using
:focus-visible
which will match only when focus is received via keyboard. This is sufficient for mobile.For desktop, the
:focus
selector should be used with an additional attribute on the host manually set by the component.Use
:focus-within
if a nested component can receive focus, such as a button with avatar, the avatar will get the focus when touched.The manual attributes
[focused]
and setting them viafocusin
andfocusout
handlers is discouraged and should be clarified additionally.Example implementation
#8253
The text was updated successfully, but these errors were encountered: