Bug 251469

Summary: Accessible.getDescription should not return name
Product: [Eclipse Project] Platform Reporter: Carolyn MacLeod <carolynmacleod4>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cocoakevin, grant_gayed, steve_northover
Version: 3.5Keywords: accessibility
Target Milestone: 3.5 M3   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
patch to not return name in getDescription
none
new patch to not return name in getDescription none

Description Carolyn MacLeod CLA 2008-10-20 15:52:59 EDT
- Load SWT Cocoa and the SWT examples from HEAD.
- Run org.eclipse.swt.examples.accessibility.AccessibleShapesExample
- turn on VoiceOver
- type the TAB key to give focus to the various shapes
Note that the shapes report their name twice.

In Accessible.getDescription(), if there isn't any description, then we should just return, instead of asking the application for a name.
Comment 1 Carolyn MacLeod CLA 2008-10-20 16:00:06 EDT
Created attachment 115613 [details]
patch to not return name in getDescription

Here's a patch.
Comment 2 Carolyn MacLeod CLA 2008-10-20 16:30:45 EDT
OK... the patch works properly from a VoiceOver point of view, but it generates exceptions because Cocoa thinks SWTView should implement getDescription. But there's a bigger problem here - why is everything being delegated to the super if the accessible doesn't implement it? We should be answering more "nulls", i.e. doing less work. In general, just delegate back to Cocoa instead of trying to see if some super will handle the request.
Comment 3 Carolyn MacLeod CLA 2008-10-20 16:51:29 EDT
Created attachment 115623 [details]
new patch to not return name in getDescription

Ignore the discussion in comment 2 - I will open a new bug for that. In the meantime, here is a patch that simply fixes this bug (name spoken twice), and doesn't try to delete more code at the same time <g>.
Comment 4 Scott Kovatch CLA 2008-10-22 15:34:59 EDT
Fixed >= 20081022.