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

(Accessibility) Fix contrast issues in Search Profiler #207732

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

VriaA
Copy link
Contributor

@VriaA VriaA commented Jan 22, 2025

Summary

This PR fixes #195106
I used the default text color set for Light Mode in Dark Mode.

Before

details_table_before2

After

details_table_after2

Before

table_before2

After

table_after2

@VriaA VriaA requested review from a team as code owners January 22, 2025 11:11
@@ -29,7 +30,7 @@ export const HighlightDetailsTable = ({ breakdown }: Props) => {
{
name: 'Time',
render: (item: BreakdownItem) => (
<EuiBadge style={{ backgroundColor: item.color }}>
<EuiBadge style={{ backgroundColor: item.color, color: euiTheme.colors.plainDark }}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the impression that the EuiBadge component would automatically change to the most contrast-appropriate text color when applying the badge color via the color prop (rather than inlining overriding styles). Would you mind changing to using the prop and seeing if that alleviates your need to define the text color here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback. I’ve updated the code to use the color prop.

@VriaA VriaA force-pushed the fix/contrast-issues-in-search-profiler branch from be60fe3 to 85d0374 Compare January 31, 2025 10:49
@MichaelMarcialis
Copy link
Contributor

Thanks for making that change, @VriaA. If you don't mind, I made a few small suggested tweaks for your branch in a separate PR. If you agree with those suggestions and merge into your branch, I'd be happy to give this an approval.

…arch-profiler-mm

Search Profiler Contrast Issue Suggested Tweaks
Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for merging in those suggestions, @VriaA! Looks good from my perspective!

@VriaA
Copy link
Contributor Author

VriaA commented Feb 5, 2025

Thank you very much @MichaelMarcialis 😁

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

Successfully merging this pull request may close these issues.

(Accessibility) No contrast between text & foreground in Search Profiler
3 participants