Bug 67410 - VoiceOver does not provide typing or cursor movement echo in text
Summary: VoiceOver does not provide typing or cursor movement echo in text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium major
Assignee: Boris Dušek
URL:
Whiteboard: target:4.2.0 target:4.1.2 target:4.0.6
Keywords:
Depends on:
Blocks: a11y-macOS
  Show dependency treegraph
 
Reported: 2013-07-27 18:45 UTC by Boris Dušek
Modified: 2013-08-10 14:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Dušek 2013-07-27 18:45:45 UTC
If one has a text in Writer and is using VoiceOver, then in the following situations, VoiceOver echo is missing:

* typing echo: when typing new characters into the text / deleting present ones
* cursor movement echo: when moving the cursor through the text using left/right/up/down arrow
Comment 1 Boris Dušek 2013-07-27 18:50:18 UTC
I found that while the libreoffice code (process) does post the NSAccessibility{SelectedText,Value}ChangedNotification on the right element using the NSAccessibilityPostNotification function, an outside process listening to the AX{{SelectedText,Value}Changed notifications (using the ApplicationServices.framework) does not receive these notifications (I wrote a testing utility to listen to such notifications - it did not see these notifications but saw other notifications without a problem).

I have not yet pin-pointed the cause of this, just have some unverified speculations.
Comment 2 Boris Dušek 2013-07-27 18:51:53 UTC
Just adding this is on OS X 10.8.4 with latest master. (well, week old to be precise :-)
Comment 3 Boris Dušek 2013-07-28 18:30:12 UTC
I just confirmed one hypothesis (using a sample testing code) - accessibility cannot listen to notifications posted by NSView objects that do not "reasonably" participate in the view hierarchy. I.e. if there is a NSView subclass that implements accessibility methods and its instance is an accessibility child of some NSView * "parent" but not subview of that "parent", then e.g. NSAccessibilitySelectedTextChangedNotification sent on the subclass have no effect, but the moment one adds the subclass's instance as a subview of the "parent" view, the notification has an effect.

I will try to put the A11yWrapper's (which inherit NSView) into a hierarchy and attach the hierarchy to some "real" NSView and see whether that will work.
Comment 4 Boris Dušek 2013-07-30 18:24:00 UTC
Just writing that making all A11yWrapper's into a NSView hierarchy (by being subviews) and attaching that hierarchy as subview of SalFrameView indeed does fix the issue and Writer (and cells in Calc) provide typing and cursor movement echo. I just need to take care of proper memory management (remove the subviews properly and only in the right cases when the A11yWrapper is destroyed) before a patch is ready.
Comment 5 Jorendc 2013-07-31 10:56:20 UTC
I see are an expert on this matter :-). New right away (and a patch waiting for approval from you https://gerrit.libreoffice.org/#/c/5208/)

Thanks for your work!
Comment 6 Commit Notification 2013-08-01 16:46:44 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=610a4a9498c78293566e3996a9672269a7f085e2

fdo#67410: VoiceOver does not provide typing or cursor movement echo in text



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 8 V Stuart Foote 2013-08-04 17:45:16 UTC
Boris,

Gald you got the VoiceOver sorted as with https://gerrit.libreoffice.org/#/c/5208/ and have gone ahead and reverted fdo#54320 on master, in favor of the 5208 item ao

https://gerrit.libreoffice.org/#/c/5239/  reverts 
https://gerrit.libreoffice.org/#/c/5155/

But, should we try to revert the fdo#54320 patches to 4.0.5 and 4.1.1?

https://gerrit.libreoffice.org/#/c/5157/
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-1&id=37eb789055b3b079fc8f6784832822f85dab2d0e

https://gerrit.libreoffice.org/#/c/5158/
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-0-5&id=b9b452a570bea90f27082e5b70aedf9b8f9d421e

and cherry pick the 5208 commit as proper fix for those pending builds.

Stuart
Comment 9 Boris Dušek 2013-08-04 18:11:05 UTC
Hello Stuart, it all depends on how conservative patch policies are in place for 4.0 and 4.1. Just from how it would benefit VoiceOver users, I would be all for to get this patch included into 4.1 and 4.0 (and revert https://gerrit.libreoffice.org/#/c/5157/ and https://gerrit.libreoffice.org/#/c/5158/), just not sure how much open e.g. 4.0 is for changes. From your question I expect it is still open :-) so I will submit review requests for these and post them here.
Comment 10 Boris Dušek 2013-08-04 18:21:57 UTC
Reviews for 4.1: https://gerrit.libreoffice.org/5277 (and the revert https://gerrit.libreoffice.org/5278)

Reviews for 4.0: https://gerrit.libreoffice.org/5279 (and the revert https://gerrit.libreoffice.org/5280)
Comment 11 Commit Notification 2013-08-09 13:07:34 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f4d95b86675e6d672e0b36448e4102be0ede339&h=libreoffice-4-1

fdo#67410: VoiceOver does not provide typing or cursor movement echo in text


It will be available in LibreOffice 4.1.2.

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 12 Commit Notification 2013-08-10 14:56:59 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=86499a56c2a746bcbde8a7f6b278b0b5ef84ce86&h=libreoffice-4-0

fdo#67410: VoiceOver does not provide typing or cursor movement echo in text


It will be available in LibreOffice 4.0.6.

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.