GNOME Bugzilla – Bug 372777
Wrong, out of order accessibility text events
Last modified: 2015-02-27 11:38:19 UTC
The order of caret movement and text insertion/deletion events for gnome-terminal differs from all other gtk text widgets. The normal event orderings are the following: Insertion 1) insert 2) move Deletion 1) delete (delete key) or 1) delete (backspace key) 2) move In the current version of gnome-terminal, the event ordering is the following: Insertion 1) move (to the location one past the last character in the text to be inserted) 2) delete (all text to be inserted before it's inserted) 3) insert (the text to be inserted) Deletion 1) delete (delete key) 2) insert or 1) move 2) delete (backspace key) 3) insert The fact that insert AND delete events are always fired whether text was actually inserted or deleted is confusing for ATs. Furthermore, putting the move event before the insertion/deletion makes it difficult for an AT to determine whether the movement was due to text insertion/deletion or navigation without insertion/deletion. The problem is that the AT has to "predict" whether an insert/delete will follow a move before it can tell the user what has actually happened. This requires hacks like knowing what key has been pressed to cause the event (which discounts programmatic movement, insertion, deletion, mouse clicks, etc.) The standard gtk event ordering mitigates this problem by first letting the AT know what is causing the movement.
*** Bug 338014 has been marked as a duplicate of this bug. ***
Created attachment 295392 [details] Pyatspi script to watch for caret-moved and text-changed events. Based on the script from bug 166637 comment 24. Cmdline script to debug these events in a running gnome-terminal/vte. This script should be ran in a non-gnome terminal so that it doesn't reports events occurring in its own terminal. Debugging with accerciser (as described in bug 338014, s/at-poke/accerciser/) causes it to hang for me (becomes unresponsible).
Created attachment 295394 [details] [review] Fix Could you guys please test this patch?
Committed the patch - please reopen or file a new bug if there are still problems.