Bug 220471

Summary: [Accessibility] Editable Combo is not accessible on Leopard
Product: [Eclipse Project] Platform Reporter: Carolyn MacLeod <carolynmacleod4>
Component: SWTAssignee: Carolyn MacLeod <carolynmacleod4>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: duongn, steve_northover, swingler
Version: 3.3Keywords: accessibility
Target Milestone: 3.4 M7   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Carolyn MacLeod CLA 2008-02-26 16:38:54 EST
I20080207-1530 - Carbon

VoiceOver does not read editable Combos on OS X 10.5 Leopard.

VO just says "combo box blank" when encountering an editable Combo that contains some text.
Read-only Combos are read correctly.
Comment 1 Carolyn MacLeod CLA 2008-02-26 16:45:50 EST
Strangely, it does read the text in the combo when you click on the text with the mouse.
The "combo box blank" is read when you tab into the combo with the keyboard.
Characters typed into the Combo are not echoed.
Comment 2 Carolyn MacLeod CLA 2008-04-17 17:17:26 EDT
Fixed > 20080417
Comment 3 Carolyn MacLeod CLA 2008-04-18 13:31:41 EDT
Confirmed with XCode that (Carbon) ComboBox is not accessible on Leopard.
To see this, create a little Carbon app using XCode/Interface Builder and drop a HIComboBox on the window. (You can find Combo Box under "Text Controls" in IB).
Inspect the Combo Box and give it a title, some items, and check Auto Sizes and Auto Discloses.
Drop another control, like a HITextField, on the window too, so that something else can take focus.
Turn on VoiceOver (Command+F5).
Type tab to go back and forth between the 2 controls.
Notice that VO speaks the text in the TextField, but not the text in the ComboBox or its drop-down list.

Mike, is there anything special that I need to do to make Combo Box accessible on Leopard?

I am going to reboot to verify that this works on Tiger - pretty sure it does.
Comment 4 Carolyn MacLeod CLA 2008-04-18 13:48:30 EDT
I was wrong - it doesn't work on Tiger. I had to do something to work around this for SWT before, and I guess my work-around doesn't work on Leopard. I will investigate why my Tiger work-around doesn't work on Leopard.
Comment 5 Carolyn MacLeod CLA 2008-04-21 14:10:17 EDT
My work-around that works on Tiger but not on Leopard was to hook kEventAccessibleGetNamedAttribute and return the Combo text field's value whenever VoiceOver asked for kAXValueAttribute or kAXTitleAttribute. This works on Tiger, because these 2 attributes are already in the list of attribute names for a HIComboBox - I didn't have to add them. But on Leopard, apparently I have to implement
kEventAccessibleGetAllAttributeNames and add these 2 attributes so that VoiceOver knows to ask for them. Tiger wasn't even calling kEventAccessibleGetAllAttributeNames for ComboBox. (Or more likely  VoiceOver on Tiger wasn't calling it). Anyhow, not a Mac bug. In fact, the Leopard behavior is probably more "correct". So nothing more to do here.