| Summary: | Accessibility failure for MenuItems and TreeItems | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Brandon Brockway <brockway> |
| Component: | SWT | Assignee: | Carolyn MacLeod <carolynmacleod4> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Keywords: | accessibility |
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Brandon Brockway
CAR it investigate right away. Possibly a serious issue for 3.0. MenuItems and TreeItems work as expected by default, in the MSAA Inspector, in JAWS and in Window-Eyes. I do not have Scout. MenuItems and TreeItems use their text as their accessible name, but they do not have a description. For info on the expected Windows default for Tree View controls, see: http://msdn.microsoft.com/library/en-us/msaa/msaapndx_3woc.asp For info on the expected Windows default for Menu Items, see: http://msdn.microsoft.com/library/en-us/msaa/msaapndx_00q5.asp In accessibility, "items" are called "children" and they are referenced by a "childID", which is typically a 0-based index. The appropriate Accessible object to use if you want to override the default behavior is the Accessible object of the parent. For example, to override the default accessible name or description for a TableItem, simply add an AccessibleListener to the Accessible object for the parent Table, eg: table.getAccessible().addAccessibleListener(new AccessibleAdapter() { public void getName(AccessibleEvent e) { if (e.childID == ACC.CHILDID_SELF) { e.result = "The Table itself"; } else { e.result = "The TableItem with childID=" + e.childID; } } }); Note that TreeItems are a little bit different from other items in that the childID for a TreeItem is in fact the TreeItem's handle, and not a 0-based index (because TreeItems do not have an index). The above code would still work fine for a Tree with TreeItem "children", but if you were doing any kind of lookup using the childID, you might need to know what the childID represented. As for MenuItem, you are correct that there is currently no SWT API to access the IAccessible for a Menu. What do you need it for? The default behavior is what one would typically expect. The only use I can think of would be if you have a menu that only contains icons - no text. How important is this feature to you? We will not be adding anything like this for 3.0. Closing this bug as "won't fix". Please open a new bug for the specific case of menu items if you have a need to override the default behavior in your application, and please explain why you would need this. Thanks. |