Bug 71435 - Accessible caret-moved events missing when editing cells if "freeze" is enabled [a11y]
Summary: Accessible caret-moved events missing when editing cells if "freeze" is enabl...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Tamás Zolnai
URL:
Whiteboard: target:5.4.0 target:5.3.0.1 target:5.2.5
Keywords: accessibility
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2013-11-09 19:55 UTC by Joanmarie Diggs
Modified: 2017-07-13 11:58 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
accessible-event listener (279 bytes, text/x-python)
2013-11-09 19:55 UTC, Joanmarie Diggs
Details
test case (6.80 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-11-09 19:55 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-09 19:55:04 UTC
Created attachment 88946 [details]
accessible-event listener

Steps to reproduce:
1. Launch the attached accessible event listener
2. Open the (to be) attached Calc document
3. Give focus to A1 or B1, press F2, then press Left Arrow and Right Arrow
4. Give focus to A2 or B2, press F2, then press Left Arrow and Right Arrow

Expected results: During both step 3 and step 4, accessible caret-moved events would appear in the terminal for each press of Left or Right.

Actual results: Things work as expected for A1 and B1, but there are no accessible caret-moved events when pressing Left or Right while editing A2 and B2.

Work around: If you go to the Window menu and disable "freeze", things work as expected.

Impact: Users who are blind, who don't know about the work around, have a difficult time editing the contents of certain cells because their screen reader is not informed that the caret has moved and therefore remain silent.
Comment 1 Joanmarie Diggs 2013-11-09 19:55:28 UTC
Created attachment 88947 [details]
test case
Comment 2 Joel Madero 2013-11-15 02:24:22 UTC
Requesting input on this one - no clue if it's a bug, enhancement or not our issue.
Comment 3 Robinson Tryon (qubit) 2013-11-15 22:12:44 UTC
(In reply to comment #0)
> 
> Expected results: During both step 3 and step 4, accessible caret-moved
> events would appear in the terminal for each press of Left or Right.

Hi Joanmarie,

Did LibreOffice previously provide these accessible caret-moved events?  (And if so, do you remember the last version of LibreOffice that provided them?)

This information is helpful for us to track down regressions in the code.

Thanks!
Comment 4 Joanmarie Diggs 2013-11-15 22:39:43 UTC
(In reply to comment #2)
> Requesting input on this one - no clue if it's a bug, enhancement or not our
> issue.

It's an accessibility bug in LibreOffice.

(In reply to comment #3)
> Did LibreOffice previously provide these accessible caret-moved events? 

I think you inherited this bug from OpenOffice which inherited it from StarOffice. It's been around a while. :(
Comment 5 Robinson Tryon (qubit) 2013-11-15 22:46:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Did LibreOffice previously provide these accessible caret-moved events? 
> 
> I think you inherited this bug from OpenOffice which inherited it from
> StarOffice. It's been around a while. :(

Okay, so not a regression. I'll try to repro.
Comment 6 Joel Madero 2013-11-15 23:36:48 UTC
This should not be NEW until it's confirmed by an independent person. Marking as UNCONFIRMED
Comment 7 Robinson Tryon (qubit) 2013-11-15 23:51:54 UTC
CONFIRMED using LO 4.1.2.3 on Ubuntu 12.04.3 (plus the accessible-event listener as attached to this bug).

(In reply to comment #0)
> Steps to reproduce:
> 1. Launch the attached accessible event listener
> 2. Open the (to be) attached Calc document
> 3. Give focus to A1 or B1, press F2, then press Left Arrow and Right Arrow

Accessible caret-moved events appear in the terminal

> 4. Give focus to A2 or B2, press F2, then press Left Arrow and Right Arrow

No events appear in the terminal

> Actual results: Things work as expected for A1 and B1, but there are no
> accessible caret-moved events when pressing Left or Right while editing A2
> and B2.

Verified.

> Work around: If you go to the Window menu and disable "freeze", things work
> as expected.

Confirmed. Selecting cell B1 and then unchecking the freeze via Window -> Freeze changes the behavior of this cell and caret-moved events are visible in the listener.

---

Status: NEW
Comment 8 Robinson Tryon (qubit) 2013-11-18 16:20:47 UTC
Whiteboard: Remove 'Need_Advice' now that this is confirmed.
Comment 9 Jacobo Aragunde Pérez 2014-06-19 18:39:22 UTC
At AccessibleTextHelper_Impl::UpdateSelection, the following call is not getting the correct selection:

    GetEditViewForwarder().GetSelection( aSelection )

The selection is checked against the previous state of the selection, and if no changes are detected the event is never launched.
Comment 10 Jacobo Aragunde Pérez 2014-06-20 10:06:54 UTC
The selection is not correct because it is being processed by the wrong AccessibleTextHelper_Impl object.

When pressing F2 on one of the cells of the second row, two AccessibleTextHelper objects are created instead of one like it happens in the first row. The UpdateSelection method is run by the redundant AccessibleTextHelper which contains wrong selection information.

As a side note, if you change the focus to another window and then back to Calc while editing a cell in the second row, the proper AccessibleTextHelper is invoked and the missing caret-moved events are emitted.
Comment 11 Jacobo Aragunde Pérez 2014-06-20 12:18:13 UTC
The two AccessibleTextHelper objects are added to different lists of listeners in two SfxBroadcaster objects. Either we are notifying the wrong list when we press F2, or there should only be one list.
Comment 12 Matthew Francis 2015-04-22 01:21:05 UTC
The issue with the AccessibleTextHelper objects seems somehow related to bug 71409 comment 21, and the behaviour of this bug also changes across the commit identified for that bug (c7551439a9ff4073a0b652329357be46d07b2c91)

Before that commit the caret-moved events are missing, whereas after some events appear (but seemingly only for motion to the right, not left)

However all events stop again as of 43c7830b03d141ae11d8617c0fdabefa32dd243c which follows shortly after


(although it worked slightly better for a short time, I don't think we can call this a regression - the above short period where some events were emitted was more or less accidental, and never solved the underlying problem)
Comment 13 Robinson Tryon (qubit) 2015-12-10 03:37:35 UTC Comment hidden (obsolete)
Comment 14 Tamás Zolnai 2016-12-16 00:29:51 UTC
As I see no changes for a long time. I'll take it.
Comment 15 Commit Notification 2016-12-16 11:25:04 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=06ea887f8ba34a628d7641eab210501f7bd2493d

tdf#71435: Accessible caret-moved events are missing when "freeze" is enabled

It will be available in 5.4.0.

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 16 Commit Notification 2016-12-16 12:31:46 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c869dac7c71395fd86a930c556893b6694a36e8a&h=libreoffice-5-3

tdf#71435: Accessible caret-moved events are missing when "freeze" is enabled

It will be available in 5.3.0.1.

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 17 Commit Notification 2017-01-01 17:46:38 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8e776ddb0a65fcf2be72166fa6da1bde6a885e91&h=libreoffice-5-2

tdf#71435: Accessible caret-moved events are missing when "freeze" is enabled

It will be available in 5.2.5.

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 18 Alex ARNAUD 2017-07-13 11:58:10 UTC
Dear all,

On LibreOffice 6.0 I can confirm that the bug is correctly resolved.

Thanks for the great work!

Best regards.