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

[Legend] Focus on data series after click #2443

Open
gvnmagni opened this issue May 30, 2024 · 2 comments
Open

[Legend] Focus on data series after click #2443

gvnmagni opened this issue May 30, 2024 · 2 comments
Labels
:legend Legend related issue

Comments

@gvnmagni
Copy link

After clicking on data series a persistent focus state get applied to the latest one clicked. The result of this is a little misleading and I would suggest to avoid it when clicking leaving the focus state for keyboard navigation.

@MichaelMarcialis any suggestion or idea if we deal with something similar in EUI?

May-30-2024 11-44-11

@markov00 identified where this behavior has been introduced: #880 (review)

@gvnmagni gvnmagni added the :legend Legend related issue label May 30, 2024
@MichaelMarcialis
Copy link

Hey, @gvnmagni! Based on your example, it looks like that styling is being applied on :focus of the legend item, instead of :focus-visible. By switching to :focus-visible, that should make it so the focus styles only show when necessary. In this case, that means this style would no longer be shown on click, but would show if the user attempts keyboard focus.

Also, I would recommend something like the following styles for the various states of the legend items (for consistency with EUI and better indication as to the individual clickable areas).

CleanShot 2024-06-03 at 17 35 50

@gvnmagni
Copy link
Author

gvnmagni commented Jun 4, 2024

thank you @MichaelMarcialis!

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

No branches or pull requests

2 participants