Hi,
I’m trying to add accessibility to a c++ application. There are 3 windows requiring accessibility per document:
1 - a status bar;
2 - a sort of preview bar;
3 - A document text area.
I’ve successfully added accessibility to the first two windows by writing some Objective-C++ code to provide a translation layer between c++ and the NSAccessibility properties and methods.
I’m still having trouble handling text navigation within the text area, however. Other members of this list advised me to initially attempt to get navigation working using the Navigable Static Text protocol, so I implemented support for the following:
accessibilityFrameForRange accessibilityLineForIndex accessibilityRangeForLine accessibilityStringForRange
I believe that these methods are the minimum requirement for the Navigable Static Text protocol.
Additionally, with a view to being able to manipulate the text once its window’s role is set to AXTextArea, I implemented:
accessibilityEnabled accessibilityValue accessibilityFocused accessibilityNumberOfCharacters accessibilityInsertionPointLineNumber accessibilitySelectedText accessibilitySelectedTextRange accessibilityVisibleCharacterRange Testing seems to indicate that these methods are all returning sane values when used as getters.
Unfortunately, my keyboard navigation has not improved one jot. The symptoms are:
1 - Starting with a blank document and VoiceOver set to echo characters and words, the initial letter typed is announced correctly. Subsequent letters in the word start to announce themselves, but get truncated by the announcement of “space”.
2 - Pressing Space at the end of a word announces the first word in the document.
3 - Pressing left arrow or Option+left arrow works fine for navigating by previous character or word.
4 - Pressing right arrow normally works for navigating forward by character, but sometimes fails to advance and announces nothing.
5 - Pressing Option+right arrow fails to advance by word and announces nothing.
Can anybody please offer any clues as to what might be going wrong? |