| Summary: | [Accessibility] AccessibleShapesExample doesn't show image properties | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 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: | Silenio_Quarti | ||||||||
| Version: | 3.6 | Flags: | carolynmacleod4:
review+
Silenio_Quarti: review+ |
||||||||
| Target Milestone: | 3.5 RC2 | ||||||||||
| Hardware: | Macintosh | ||||||||||
| OS: | Mac OS X | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Scott Kovatch
Created attachment 169034 [details]
Fix
Comment on attachment 169034 [details]
Fix
Nice and simple. Just add the missing attributes and remove the incorrect ones.
I do not think you can remove the children attribute all the time. The canvas could have a real child ( a label or something). I see the Accessibility Verifier gives a warning. Is that the only problem?
public static void main(String[] args) {
display = new Display();
shell = new Shell(display);
shell.setLayout(new FillLayout());
Shape redSquare = new Shape(shell, SWT.NONE);
redSquare.setColor(SWT.COLOR_RED);
redSquare.setShape(Shape.SQUARE);
Label label = new Label(redSquare, SWT.NONE);
label.setText("Label");
label.setBounds(10, 10, 30, 30);
Shape blueCircle = new Shape(shell, SWT.NONE);
blueCircle.setColor(SWT.COLOR_BLUE);
blueCircle.setShape(Shape.CIRCLE);
Shape greenSquare = new Shape(shell, SWT.NONE);
greenSquare.setColor(SWT.COLOR_GREEN);
greenSquare.setShape(Shape.SQUARE);
shell.pack();
shell.open();
redSquare.setFocus();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
}
(In reply to comment #3) > I do not think you can remove the children attribute all the time. The canvas > could have a real child ( a label or something). I see the Accessibility > Verifier gives a warning. Is that the only problem? Accessibility Inspector was complaining, yes. That's why I noticed it. The notion of an image having a child is somewhat mindblowing, but I see your point. I need to rethink this a bit. The real problem is that the AXTitle needs to be added to the set because the AccessibleListener implemented getName() and not just because ROLE_GRAPHIC is being used. Created attachment 169151 [details]
New fix
See if a description or title is being provided by any of the listeners, and if so add the Cocoa attribute to the list. We really should do this for all of the things that accessible listeners can provide, but at this point in the release cycle this is the bare minimum I think we need to do.
Created attachment 169183 [details]
other patch
Car and I think it is better keep the fix simple for now. Just add the attributes needed for GRAPHIC. We can rethink this in 3.7. Is that ok?
(In reply to comment #6) > Car and I think it is better keep the fix simple for now. Just add the > attributes needed for GRAPHIC. We can rethink this in 3.7. Is that ok? You end up with AXDescription showing up as an empty string in Accessibility Inspector because nothing implements the description property. It's not correct, but also not critical -- VoiceOver still works as expected. I do think we need to make the general fix, but this is better than nothing given where we are in 3.6. Good to go. I think a graphic is more likely to have a description than many other roles, particularly if it is a complicated image. Only the second patch here was committed. I'm leaving the first visible so we can go back to it for the general fix. Fixed > 20100519. |