| Summary: | [accessibility] text-based ToolItems read out their help/tooltip text instead of text | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Scott Kovatch <skovatch> | ||||
| Component: | SWT | Assignee: | Scott Kovatch <skovatch> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Carolyn MacLeod <carolynmacleod4> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | markus.kell.r | ||||
| Version: | 3.6 | Flags: | carolynmacleod4:
review+
|
||||
| Target Milestone: | 3.6.1 | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 340196 | ||||||
| Attachments: |
|
||||||
|
Description
Scott Kovatch
I will aim to fix this for 3.6.1. After fixing, please make sure that Eclipse tool items are still read correctly (they use the SWT accessibility API and override getName to return the tool item's tooltip as its accessible name). (In reply to comment #2) > After fixing, please make sure that Eclipse tool items are still read correctly > (they use the SWT accessibility API and override getName to return the tool > item's tooltip as its accessible name). That value should only be used when the image of an Item is null, right? You know, that's a very good question, and one I don't know the answer to. On Windows, the getWindowText (what shows up on the display) and the get_accName (what the screen reader is *supposed* to say) really are 2 different things, and they can be set separately. However, I have yet to see a screen reader that speaks the accName if there is non-null WindowText for a button, label, or tool item. I'll have to check if any new versions of screen reader speak the accName, but the last time I tried it, they didn't. If there's no tooltip text the button title is used, so that's correct. The logic is this:
--------
if (nsAttributeName.isEqualToString (OS.NSAccessibilityTitleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
String accessibleText = toolTipText;
if (accessibleText == null || accessibleText.equals("")) accessibleText = text;
if (!(accessibleText == null || accessibleText.equals(""))) {
return NSString.stringWith(accessibleText).id;
} else {
return NSString.string().id;
}
}
--------
I think the title and description should be handled separately, much like buttons are.
Created attachment 171968 [details]
Fix
NSAccessibilityTitleAttribute now returns the Item text if available and the tooltipText if not. NSAccessibilityHelpAttribute always returns the tooltip text. NSAccessibilityDescriptionAttribute was an optional attribute, and not what we should be using here.
Car, please review. (Following the 3.6.1 plan for reviews for fixes...) *** Bug 319677 has been marked as a duplicate of this bug. *** Fixed in HEAD > 20100713. Sorry, Scott. The fix looks good - go ahead for 3.6.1 as well. Thanks! I wasn't pushing you -- I just didn't want to hold up a mainline fix for Markus. Fixed in R3_6_maintenance branch > 20100714. > I wasn't pushing you
No worries! It just seemed like a good time to do the review. ;)
|