Created attachment 89119 [details] accessible-event listener Steps to reproduce: 1. Launch the attached accessible-event listener in a terminal. 2. Launch LibreOffice Writer and begin typing "helllo" (do not press Space yet) 3. While looking at the terminal, press Space. Expected results: a text-attributes-changed event would be seen to indicate that "helllo" was just marked as misspelled. Actual results: no text-attributes-changed event is seen. Impact: Orca cannot alert the user that the word which was just typed is misspelled.
confirmed in Linux kernel 2.6.32-358.23.2.el6.x86_64 with Gnome v2. DE and LODev Version: 4.2.0.0.alpha1+ Build ID: f99736820a23cb7e37139607713658dea1c69dd4 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2013-11-17_23:56:22
I've found out that 'text-spelling' is not actually a property of the text object; instead, the wrapper for ATK Text object checks the state of the spellcheck markup when it is queried for the object attributes (at text_wrapper_get_run_attributes in atktext.cxx). So the patch I'm working on is a bit 'hackish'; what I do is modifying the spell checking code to trigger an invalidation of the accessible paragraph attributes when a mistake is detected, so the 'text-attributes-changed' event is released. When the AT client application checks the attributes it will find out the presence/absence of 'text-spelling' attribute.
Jacobo Aragunde Perez committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b846847121a29b8acd9d48ef1a795ea3b9d6d974 fdo#71558: Notify mispelled word to accessibility The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The original bug is fixed, but I've noticed that when the user disables the automatic spell checking, no 'text-attributes-changed' event is released, and when it is enabled again it will only release 'text-attributes-changed' events in case some of the newly typed text is misspelled. I wonder what should be the proper behavior in this case. Feel free to reopen if you feel it's not right. Finally, I will port the patch to 4.3.0 after verification.
Jacobo Aragunde Perez committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=032a1ebc8082254887745e76e0be5760c73157e4&h=libreoffice-4-3 fdo#71558: Notify mispelled word to accessibility It will be available in LibreOffice 4.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.