-
Notifications
You must be signed in to change notification settings - Fork 843
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
Badge allow these two events iconOnClick and onClick to trigger #1994
Conversation
There were two problems happening in EuiBadge if provided both
Since we can't just wrap the icon with a |
Would it be possible to backport this in 7.2? |
@XavierM I have pushed a commit directly to your branch to fix the styles. It now looks correct: |
883f611
to
db091eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code changes so far look fine, but keyboard navigation experience has been degraded:
Previously, tabbing to the icon highlights it
Now it does a weird box/outline that is barely visible (middle icon is focused)
When both onClick
and onIconClick
are present the badge does not receive an outline when focused, and the badge text's tab order comes after the icon - first tab selects icon & triggers onIconClick
, second tab selects the badge context & triggers onClick
22c8774
to
ba389c6
Compare
Ahh I see the icon focus state styles now. Pushed a fix for that. I'm wasn't really sure how to deal with the button inside the badge focus state so I'm using @snide / @ryankeairns Any thoughts on that? |
Ugh, it looks like |
This is still true with the latest changes. Seems like it should be reversed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM; pulled & tested locally
Summary
First of all, thanks to @cchaos for helping me and move this forward.
On Firefox and IE11 browser, when these two properties
onClick
andiconOnClick
are provided on the Badge component, you will only get the event onClick working. This PR is fixing that for SIEM and DiscoverChecklist