Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessible text question



Title: Re: accessible text question
Ryan, thanks so much for taking the time to investigate this. Ironically enough I would never have encountered the problem unless I had decided to approach my implementation simply and incrementally — the final component does need to be editable! Implementing AccessibleEditableText as you suggested is doing the trick with both VoiceOver and JAWS.

Given your godlike expertise with these matters ;-) I wonder whether you know something else. I haven’t done a super deep dive on this yet, but I can’t see what the linkage is between my caret position and VoiceOver. Using a more complete implementation of the component with some cursor handling code, I see that the getCaretPosition() accessor is never called. I’m also firing the desired property change when the caret moves, however there is no listener. JTextField/JTextComponent behaves the same way — no calls into getCaretPosition(), and no listener to its property changes — yet VoiceOver understands the caret position and reads words and sentences containing the caret.

Steve

On 1/23/08 5:55 PM, "Ryan Schipper" <email@hidden> wrote:

Steve,

Having experimented with the code you provided, it seems that there is an inconsistency with the specification of the Java Accessibility API and the functionality expected from it.

In particular, the API documentation for AccessibleRole.TEXT says that it should be used for presenting text that is usually editable. As a result, one would assume implementing AccessibleText (and perhaps AccessibleExtendedText [I'm using Java 1.5]) would be enough to provide an accessible component.

However, it seems that if you return the AccessibleRole as TEXT, somewhere along the line, it has been assumed that you are also implementing AccessibleEditableText. Amusingly enough, the actual code implemented for this interface can do NOTHING, assuming you have also implemented the AccessibleExtendedText getTextRange function.

This means that there are two possible solutions for you:

1. Use the LABEL role instead.
2. Implement AccessibleExtendedText and AccessibleEditableText.

I've attached some source demonstrating the latter solution and providing a little bit more information for your analysis.

(Note: the situation may well be different for Java 1.4, but I would be surprised. )

Anyway, at the moment, this particular issue has been bumped down the priority list, but I'm working on a bug submission for either/both of Apple / Sun. If you do so before I get the opportunity, please send me tracking numbers.

Also, if any people at Apple are listening in on the conversation and have anything more to add that would be appreciated.

Regards,

Ryan Schipper


On 23/01/2008, Steve Poole <email@hidden> wrote:
Thank you, Ryan. Here's a pared down runnable sample that exhibits the same behavior.

Steve
*snip*


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: accessible text question (From: "Ryan Schipper" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.