Bug 219622 - [Graphics] High-contrast icon support - Eclipse User Experience is optimized for <1% of its users
Summary: [Graphics] High-contrast icon support - Eclipse User Experience is optimized ...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility, usability
Depends on:
Blocks:
 
Reported: 2008-02-20 11:50 EST by Randy Hudson CLA
Modified: 2021-06-24 09:50 EDT (History)
5 users (show)

See Also:


Attachments
Preferred vs. Current high contrast toolbar (18.59 KB, image/png)
2008-02-20 11:50 EST, Randy Hudson CLA
no flags Details
high contrast image descriptor (1.78 KB, text/plain)
2009-03-10 12:17 EDT, Randy Hudson CLA
no flags Details
Screenshot of eclipse 3.5 with patch applied (34.72 KB, image/gif)
2009-03-10 12:23 EDT, Randy Hudson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2008-02-20 11:50:56 EST
Created attachment 90201 [details]
Preferred vs. Current high contrast toolbar

Icons in eclipse are faded and pale in an attempt to meet accessibility guidelines for users with high-contrast color schemes, where icons in menus and toolbars are displayed on top of a black background. The results in this color scheme are anything but high-contrast for those users that actually need them to be. Yet, for everyone using default color schemes, most icons appear non-standard when compared to other familiar applications like Office. For example, paragraph alignment (left, center, right) is normally depicted with black lines. But in eclipse (or in products built on top of eclipse) some dark blue color is used instead because of accessibility concerns.

Instead of this compromised approach, this problem should be solved programmatically, as it is in Office and similar products.

ImageDescriptor should provide a getHighContrastDescriptor() method which returns an ImageDescriptor which inverts the *values* of the original descriptor's ImageData (while preserving hue/saturation).  This new descriptor should be used by ActionContributionItem and similar classes whenever high contrast mode is enabled or detected.

The attachment shows the many advantages for users who actually need high contrast. Disabled actions (as shown: Save, Print, Profile, Next and Previous Annotation) would appear as such. Circles would still be circles and not octagons (Run action). Dark shapes like "Bold" or the legs on the "Debug" bug would be white and really offer high-contrast.

For the majority of users/products, this would mean that graphic artists could once again entertain the use of black, providing consistency with other native applications. At the same time, products could actually meet accessibility requirements, rather than just claiming to do so.
Comment 1 Kim Horne CLA 2008-02-25 10:42:08 EST
Maybe for 4.0...?
Comment 2 Kevin McGuire CLA 2008-03-27 11:10:32 EDT
I like the idea of computing the high contrast ones (and leaving the graphic designers more breadth to work in).
Comment 3 Kevin McGuire CLA 2008-03-27 11:11:00 EDT
sev = major?
Comment 4 Randy Hudson CLA 2008-03-27 12:55:45 EDT
(In reply to comment #3)
> sev = major?

Mostly for accessibility. If you look at the second row in the screenshot, I don't think you would say that that is satisfying the definition of high contrast. The only visible actions are the disabled ones.
Comment 5 Kevin McGuire CLA 2008-04-09 14:10:22 EDT
Marking 3.5 for investigation purposes.
Comment 6 Kevin McGuire CLA 2009-03-09 18:50:23 EDT
While I agree that it'd be good if this work happens, there's no resources to do it presently.

Changing owner/QA contact as per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 7 Randy Hudson CLA 2009-03-10 12:17:29 EDT
Created attachment 128225 [details]
high contrast image descriptor

The attachment provider an implementation of ImageDescriptor that provides a high-contrast (value-inverted) variant of some given "base" ImageDescriptor.

I tried this out by adding to ImageDescriptor:

    public static ImageDescriptor createHighContrastVariant(ImageDescriptor desc) {
    	if (desc == null)
    		return null;
    	return new HighContrastImageDescriptor(desc);
    }


... and modifying ActionContributionItem:

	private boolean updateImages(boolean forceImage) {

		ResourceManager parentResourceManager = JFaceResources.getResources();
		boolean highContrast = isHighContrast(widget);
		...
		...
				ImageDescriptor image = action.getHoverImageDescriptor();
				if (image == null) {
					image = action.getImageDescriptor();
				}
				ImageDescriptor disabledImage = action
						.getDisabledImageDescriptor();
				if (highContrast) {
					image = ImageDescriptor.createHighContrastVariant(image);
					disabledImage = ImageDescriptor.createHighContrastVariant(disabledImage);
				}
		...
		...
		// And so on, whenever images are applied to toolbars, menus, etc.
Comment 8 Randy Hudson CLA 2009-03-10 12:19:25 EDT
The utility method in ContributionItem (to be called eventually from CommandContributionItem and other places wanting to invert images) is:



static boolean isHighContrast(Widget widget) {
	if (widget == null || !widget.getDisplay().getHighContrast())
		return false;
	RGB rgb = widget.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).getRGB();
	return rgb.red + rgb.green + rgb.blue < 20;
}
Comment 9 Randy Hudson CLA 2009-03-10 12:23:22 EDT
Created attachment 128227 [details]
Screenshot of eclipse 3.5 with patch applied
Comment 10 Randy Hudson CLA 2009-03-17 13:49:29 EDT
(In reply to comment #6)
> While I agree that it'd be good if this work happens, there's no resources to
> do it presently.

Kevin, can you (or someone) comment on the approach used in the proposed patch?  i.e., do you agree that consumers of ImageDescriptors should explicitly test the "environment" in which the Image will be placed and subsequently obtain the high-contrast variant for the Image?

Here are some issues I see with this minimal patch:
1) There are still places that need to test and use high-contrast images, such as CommandContributionItem.

2) Black or dark toolbars still occur without Display#getHighContrast() returning true.  true is only returned when gigantic fonts are also enabled using the accessibility control panel.

3) The "blackness test" simply asks SWT for the WIDGET_BACKGROUND color. Colors might not be reliable on OSes that rely on themes to render menus and toolbars.

4) The high-contrast variant imagedescriptor could be cached, even though it does implement equals() and hashcode() properly.

5) Doesn't update dynamically when the user changes system. Probably not a showstopper, since the workbench tells you to restart anyways.

Lastly, I assume an API freeze is already in effect for 3.5?
Comment 11 Boris Bokowski CLA 2009-11-17 11:48:36 EST
Susan is now responsible for watching the [Graphics] category.
Comment 12 Eclipse Webmaster CLA 2019-09-06 16:08:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.