GNOME Bugzilla – Bug 156161
AccessibleText_getTextAtOffset returns wrong values in gnome-terminal
Last modified: 2007-01-22 18:06:53 UTC
AccessibleText_getTextAtOffset (called with the current offset and with SPI_TEXT_BOUNDARY_WORD_END) returns wrong values: 1. In the lines containing the prompt, AccessibleText_getTextAtOffset returns a wrong value for endOffset. This value is the same as for startOffset (startOffset is correctly reported). As a consequence, the returned string is allways empty. 2. In the lines which doesn't conatain the prompt following problems appears: word1<space><space>word2 (the start offset is 0). If AccessibleText_getTextAtOffset is called with offset 0, the correct values are reported: startOffset = 0 endOffset = 7 text = word1 If AccessibleText_getTextAtOffset is called with offset 7 (the endOffset of the previous word), the wrong values are reported: startOffset = 0 endOffset = 7 text = word1 This problems are the cause of gnopernicus bug # 155732.
The problem is in vte.
The code in question is vte_terminal_accessible_get_text_somewhere(). The code for ATK_TEXT_BOUNDARY_WORD_START and ATK_TEXT_BOUNDARY_WORD_END is the same. This is not correct.
Created attachment 33066 [details] [review] Propsoed patch This patch provides implementation for ATK_TEXT_BOUNDARY_WORD_END. Does it fix the problem?
I managed to reproduce this bug on Linux system by mapping the command ('read whole window') on a key (G for example). I applied this patch and it seems to solve the problem for Linux systems. I wasn't able to test it on Solaris, because 'ncurses' or 'curses' or 'libtermcap' must be installed in order to build 'vte'. How can I get those modules?
*** Bug 155732 has been marked as a duplicate of this bug. ***
Created attachment 33120 [details] [review] Updated patch Corrects implementation for WORD_START.
Seeking permission to apply... this is the annual (!) ping...
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Same here. Chris, feel free to commit.
r1495: 2007-01-22 Chris Wilson <chris@chris-wilson.co.uk> Bug 156161 – AccessibleText_getTextAtOffset returns wrong values in gnome-terminal The code for ATK_TEXT_BOUNDARY_WORD_START and ATK_TEXT_BOUNDARY_WORD_END is the same. Patch by <padraig.obriain@sun.com> * src/vteaccess.c: (vte_terminal_accessible_get_text_somewhere): Actually provide an implementation for ATK_TEXT_BOUNDARY_WORD_END.