eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

The color of the description foreground in content assistant popups can be improved for accessibility concern

Open jdneo opened this issue 2 months ago • 5 comments

According to the app 'Accessibility Insight for Windows', it shows that the color ratio between the description foreground and background is less than 4.5:1. See:

Image

We can make it slightly darker, for example. change it from #808080 to #767676, to fulfill the requirement:

Image

Reference: https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html

jdneo avatar Oct 29 '25 07:10 jdneo

I am not sure if I get what you say. Do you refer to the contrast ration between the background color of the selected item in the content assist (grey) and the text of it (black)? But you measured the contrast between the grey and white. Can you explain in more detail?

BeckerWdf avatar Oct 29 '25 08:10 BeckerWdf

I'm measuring this part

Image

jdneo avatar Oct 29 '25 08:10 jdneo

Can you also check in the dark theme? Is the same color used here or does the Description use a specific color for the dark theme? How is the contrast there?

BeckerWdf avatar Oct 29 '25 08:10 BeckerWdf

Yes same color used in dark mode, and it's more worse

Image

If set it to #A1A1A1 looks good

Image

jdneo avatar Oct 29 '25 08:10 jdneo

this color is coming from JFacePreferences#QUALIFIER_COLOR Which can be configures here:

Image

So to fix this issue we can define a better default and also provide a separate color for the dark theme in the dark theme's CSS file.

This color is also used on multiple other places in the IDE. But the good thing is it's always on a light background (in the light theme)

I set this to magenta in my IDE so it can easily be seen:

It's used e.g. in the Git Repo View: Image

Used in "Find actions" (Command-3) so render the key bindings for commands:

Image

In the open Resource dialog:

Image

Do we have white for the editor or dialog background and a very light grey as background in views. So the contrast has to be good in both these cases.

Similarly in the dark theme where we have a darker background in the editor and and slightly lighter background in the views.

BeckerWdf avatar Oct 30 '25 15:10 BeckerWdf