Community
Participate
Working Groups
StyledText is returning some wrong values in AccessibleTextExtendedListener#getText() when the boundary type is TEXT_BOUNDARY_WORD. For example, "hello world" the word at 6 (count=0) was returning "hello" I saw the problem running linux's accerciser tool.
Created attachment 167398 [details] patch Some rules I followed for this patch 1) whitespaces are treat as trailing characters from the previous word 2) start is a word start and end is a word end 3) return "" when a word before the first word is requested 4) return "" when a word after the last word is requested I was only able to test with start==end and count==0 -> atk getTextAtOffset() start==end and count==-1 -> atk getTextBeforeOffset() start==end and count==+1 -> atk getTextAfterOffset()
Note: the results from Text and StyledText as the native controls handles boundary type word start and word end, StyledText only handles boundary type word. We can make the (atK) accessible object for StyledText answer the same values as Text by calling StyledText multiple times.
Sorry (I was in a bit of a rush), I meant to say Note: the results from Text and StyledText ARE NOT THE SAME as the native control...
I am very happy with this patch. I tested with both NVDA and JAWS, and I opened a WordPad with the same text, and StyledText works the same as WordPad now with both JAWS and NVDA. Please go ahead and commit this. You have my +1.
Fixed in HEAD > 20100507