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

[EuiBadge][COLOR CONTRAST]: It is difficult to see selected text when I click and drag or select all with the keyboard #7722

Closed
1Copenut opened this issue Apr 30, 2024 · 2 comments · Fixed by #7752

Comments

@1Copenut
Copy link
Contributor

Describe the problem
This issue was raised in a thread in the EUI slack channel where the user was having trouble determining when text was selected using their mouse. After some discussion, we determined the text was being selected, but the default ::selection CSS background color was almost identical to our EuiBadge background color.

I did some more experimenting with the EuiBadge component in light and dark themes. The screenshots below show most of our badges make it difficult to see selected text with Chrome's default CSS.

Light theme, all text selected, Chrome latest, MacOS
Screenshot 2024-04-30 at 12 19 49 PM


Dark theme, all text selected, Chrome latest, MacOS
Screenshot 2024-04-30 at 12 19 57 PM

Environment

Proposed solution

We should review these badges and add custom CSS for the ::selection pseudo-class. This selector is supported in all evergreen browsers and would be a big improvement for accessibility.

See MDN ::selection entry for more information and browser support.

WCAG or Vendor Guidance (optional)

@JasonStoltz
Copy link
Member

@1Copenut Do you remember where this came in from? A slack thread, or a kibana issue?

@JasonStoltz
Copy link
Member

We talked about this today. We think we could solve this by setting the selected color to be in the inverse of the background color. These are prevalent enough in our UI that it is worth cleaning up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants