Bug 142826 - [JFace] ColorFieldEditor should return label text in accessible listener methods
Summary: [JFace] ColorFieldEditor should return label text in accessible listener methods
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2006-05-19 14:53 EDT by Syed Atif CLA
Modified: 2006-06-26 15:02 EDT (History)
4 users (show)

See Also:


Attachments
This screenshot shows a preference page containing multiple color selectors. (43.58 KB, image/jpeg)
2006-05-19 14:54 EDT, Syed Atif CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Syed Atif CLA 2006-05-19 14:53:20 EDT
[This bug is in response to Bug 142231.]

It seems that the ColorFieldEditor returns 'Color Selector' by default in the getName() method of the accessible API. This is not much use if the user doesn't know what s/he is selecting the color for. I suggest to use the labeltext as the default name for the screen reader to narrate the labeltext instead.
Comment 1 Syed Atif CLA 2006-05-19 14:54:54 EDT
Created attachment 42065 [details]
This screenshot shows a preference page containing multiple color selectors.

You can see from the screenshot here that we have multiple color
selectors...thus the default text narrated is 'Color Selector' for each of the
buttons. This is not very useful in terms of actual accessibility. By default,
I believe it should associate the accessibility name of the control to the
label text, and the 'Color Selector' part can, perhaps, be provided as the
description of the control (for example, instead of the default 'Push button
-to press, use Space bar', the button's accessibility listener method can be
overridden to provide 'Color selector - to select, use space bar').
Comment 2 Susan McCourt CLA 2006-05-19 15:01:21 EDT
Thanks, Syed.  
Targeting this for 3.3 since you have a workaround, and if it comes up again from other apps we might consider for 3.2.x.
Comment 3 Susan McCourt CLA 2006-06-22 13:39:03 EDT
We could fix this by having the field editor install a listener on the ColorSelector's button, using the field editor label as the name.  This is the most straightforward, although ColorSelector would still be installing its own listener using "ColorSelector" as a name.  Since this approach worked as a workaround in bug #142231, I assume that the last installed listener wins.  I can verify on windows using Inspect32, but not sure how to verify on other platforms.  

The only way to avoid installing multiple listeners would be to add API to ColorSelector to supply the accessible name of the button, and then ColorSelector could install the listener to use that name if provided, or "ColorSelector" by default.  I don't like this as it adds API for specifying accessibility info, and we don't normally do that.

Karice, do you know how to check a control's accessible name on non-windows platforms so that I could verify that having FieldEditors install a second listener would work on all platforms?
Comment 4 Karice McIntyre CLA 2006-06-22 16:44:16 EDT
There is a lack of tools and assistive technology for non-Windows platforms.  If it works on Windows then I think is ok.  
Comment 5 Tod Creasey CLA 2006-06-26 08:07:05 EDT
The reason we have not added any more support than the default is that to a non sighted user "Color Selector" is suffecient to let them know that it is of no use to them. The fact that it is a color for a particular item is not that helpful.

I'll also point out that the themes extension point puts color settings in the colors and fonts preference page which is much easier for a user with color problems to use. Otherwise they have to hunt around all of the preference pages to find the one that defines the color they are having trouble with.

I think any further work on this would be a waste of time as there is no user it would be useful for. ColorSelector does not have an associated label so adding one to cover this unneccessary feature would break all uses of ColorSelector out there.

I would mark this WONTFIX.

And Susan using the inspect32 tool is suffecient to test anything that calls the SWT accessibility API.
Comment 6 Susan McCourt CLA 2006-06-26 15:02:24 EDT
The suggestion was not to add a label to ColorSelector, but to use the label of the ColorFieldEditor as the accessible name when a ColorFieldEditor creates a ColorSelector.  

However, I understand Tod's position that a non-sighted user won't be changing the color anyway.  Apps that want more specific labels can install the listener themselves as was done in bug #142231.  So I will mark this as WONTFIX and if anyone else has issue with this it can be reopened.