Bug 90869 - [CheatSheets] Cheat Sheets are not very accessible to screen readers
Summary: [CheatSheets] Cheat Sheets are not very accessible to screen readers
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2005-04-08 17:48 EDT by Carolyn MacLeod CLA
Modified: 2005-05-02 18:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2005-04-08 17:48:22 EDT
eclipse build 3.1 M6 (April 1/2005)

Please download the following tool from Microsoft, called inspect32.exe:
http://www.microsoft.com/downloads/details.aspx?
displaylang=en&familyid=3755582a-a707-460a-bf21-1373316e13f0
(Note that Bugzilla split the link across 2 lines).

Create a desktop shortcut for inspect32.exe and call it something like "MSAA 
Inspector" or "Accessibility Inspector".  Keep it somewhere useful that you 
will remember (I have mine on my Start menu <g>). This is a tool that can be 
used to help make your UI more accessible to screen readers.

Now run inspect32. Note that it just brings up a little "stay on top" window 
containing a list of field names and their values.  The fields have names 
like 'Name:', 'Value:', 'Role:', 'State:', etc.  As you move the mouse around -
 or more importantly, as you tab and arrow around through your UI - note that 
the field values change based on which control has focus.  For basic screen 
reader accessibility, the most important field is 'Name:'.  If you tab 
somewhere, or use an arrow key, and you look at 'Name:' and if it says 'none', 
then you know that you have some work to do.  Pretty much everything you tab 
to should have some kind of name.

So, for example, if I select
   Help->Cheat Sheets... Other -- "Hello World Application" -- OK
to open a "Cheat Sheets" view entitled "Simple Java Application", then I look 
at the inspect32 window, I see that the Name is 'none', and I know that a 
screen reader couldn't speak anything useful to a blind developer here.

At this point, the little minus sign beside the word "Introduction" has focus, 
so probably the most useful Name here would be "Introduction". I believe the 
little minus sign corresponds to your class named TreeNode - correct?
If so, what you need to do is add an AccessibleListener to all TreeNodes, and 
implement the getName method to return the text of the "Introduction" Label. 
For example, towards the end of your TreeNode constructor, perhaps, or 
somewhere after the widget has been created, you need something like the 
following (I am just guessing at the names, of course):

treeNodeWidget.getAccessible().addAccessibleListener(new AccessibleAdapter() {
	public void getName(AccessibleEvent e) {
		e.result = myLabelSibling.getText();
	}
});


Continuing from here, if you type tab again, and look at the inspect32 window 
again, you will notice that the little question mark icon that now has focus 
also does not have a name. It looks like this class is called an 
ImageHyperlink. I see that it does have the Help text "Open Related Help". You 
need to have something similar in the Name field, and you need to proceed in a 
similar manner to the above, except this time for ImageHyperlink. You might 
want to return something like:
	e.result = "Open Help Related To " + myLabelSibling.getText();


Continuing from here, tab twice more and there is another ImageHyperlink, with 
the Help text of "Click to Begin". So in my previous ImageHyperlink example, 
you will obviously have to be smarter than what I suggested, because 
ImageHyperlinks can have different help text, and you need to use the help 
text specific to the ImageHyperlink instance.

There's more (sorry) but adding these 2 Name fields will help a lot.
I am going to add a new comment to discuss the rest.
Comment 1 Carolyn MacLeod CLA 2005-04-08 18:12:38 EDT
After adding the Names, there are a couple more little bugs I noticed in the 
CheatSheets "tree". Run inspect32 again, and give focus to a TreeNode. Notice 
that the Value field contains 0 if the TreeNode is collapsed (looks like +) 
and 1 if the TreeNode is expanded. Now look at the Tree in the Package 
Explorer view. The Value of a top-level item in the Tree is always 0. Those 
numbers represent the level, not the expansion state. So your TreeNode should 
probably always have a Value of 0, to make any sense to a screen reader.

You will want to look at the other fields of TreeNode and make sure they look 
like Tree wherever possible. For example, the State field should say selected 
and focused in addition to expanded/collapsed. For example, look at the 
implementation of getState(AccessibleControlEvent e) in 
org.eclipse.swt.custom.CTabFolder.

Comment 2 Carolyn MacLeod CLA 2005-04-08 18:19:16 EDT
One more thing, and this is a hard one that I'm not sure how to fix.

When the user tabs into the read-only edit field (the "FormText"?), i.e. the 
one containing "Welcome to the Hello World Java tutorial... etc"...

This is where a typical blind user would hear that this is a "read-only edit" 
and they would typically use the arrow keys to navigate through the text and 
read it at their own pace. But you are eating the arrow keys for your tree 
emulation. So this makes the text very hard to listen to, because they have to 
get used to paying attention right up front when the text is read (once only). 
Anyhow, I'm not sure if you can do anything about it, but I wanted to bring it 
to your attention.
Comment 3 Dejan Glozic CLA 2005-05-02 15:45:04 EDT
I installed inspect32.exe and also Window-Eyes. Cheatsheets and other Form-
based parts are now much more accessible.

Regarding the last comment: text in cheat sheets in static. Similar text in a 
browser page is not read either. When tabbing through this very Bugzilla page, 
inspect32.exe was only reporting hyperlinks and controls, but didn't go into 
text in between. I had to move the mouse over the text to read it.
Comment 4 Carolyn MacLeod CLA 2005-05-02 16:32:16 EDT
Great, Dejan - thanks!
Did the changes make it into today's integration build?
Comment 5 Dejan Glozic CLA 2005-05-02 17:10:29 EDT
No, I just released the code.
Comment 6 Carolyn MacLeod CLA 2005-05-02 18:44:37 EDT
Thanks, Dejan.
Frank, it is probably best if you wait until the Milestone 7 build is ready, 
i.e. after Friday May 13, before trying this out.