Bug 71558 - Accessible text-attributes-changed signals are not emitted when a word becomes marked as misspelled [a11y]
Summary: Accessible text-attributes-changed signals are not emitted when a word become...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Jacobo Aragunde Pérez
URL:
Whiteboard: target:4.4.0 target:4.3.0.2
Keywords:
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2013-11-13 05:14 UTC by Joanmarie Diggs
Modified: 2014-06-25 12:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
accessible-event listener (285 bytes, text/x-python)
2013-11-13 05:14 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2013-11-13 05:14:22 UTC
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.
Comment 1 V Stuart Foote 2013-11-22 00:28:45 UTC
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
Comment 2 Jacobo Aragunde Pérez 2014-06-19 16:27:41 UTC
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.
Comment 3 Commit Notification 2014-06-19 18:40:55 UTC
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.
Comment 4 Jacobo Aragunde Pérez 2014-06-19 18:45:27 UTC
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.
Comment 5 Commit Notification 2014-06-25 12:25:30 UTC
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.