Bug 87680 - No accessible caret-moved events in Writer tables
Summary: No accessible caret-moved events in Writer tables
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.1 rc
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility, bibisected, bisected, regression
: 105487 (view as bug list)
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2014-12-24 13:28 UTC by Joanmarie Diggs
Modified: 2023-04-09 05:12 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
test case (530.81 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-12-24 13:28 UTC, Joanmarie Diggs
Details
accessible-event listener (272 bytes, text/x-python)
2014-12-24 13:28 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2014-12-24 13:28:35 UTC
Created attachment 111289 [details]
test case

Steps to reproduce:
1. Open the attached document
2. Launch the attached accessible-event listener in a terminal
3. Arrow amongst the characters at the top of the document
4. Arrow amongst the characters in the table

Expected results: Accessible caret-moved events would be seen each time the caret moves.

Actual results: Accessible caret-moved events are seen when the caret moves outside the table; but no caret-moved events are seen when the caret moves inside the table.
Comment 1 Joanmarie Diggs 2014-12-24 13:28:59 UTC
Created attachment 111290 [details]
accessible-event listener
Comment 2 Jean-Philippe MENGUAL 2014-12-24 14:17:51 UTC
The bug is still here in 4.3.5, e.g. the latest Evolution available on the TDF website.

Regards,
Comment 3 Robinson Tryon (qubit) 2014-12-30 05:13:12 UTC
Comment on attachment 111289 [details]
test case

fix mimetype
Comment 4 Robinson Tryon (qubit) 2014-12-30 05:27:55 UTC
TESTING with Ubuntu 14.04 + LO 4.3.5.2 and 4.4.0.1

(In reply to Joanmarie Diggs from comment #0)
> Steps to reproduce:
> 1. Open attachment 111289 [details]
> 2. Launch the attached accessible-event listener in a terminal
> 3. Arrow amongst the characters at the top of the document
> 4. Arrow amongst the characters in the table
> 
> Expected results: Accessible caret-moved events would be seen each time the
> caret moves.

Yes

> Actual results: Accessible caret-moved events are seen when the caret moves
> outside the table; but no caret-moved events are seen when the caret moves
> inside the table.

NOREPRO: I'm seeing caret-moved events whenever I arrow up/down/left/right, whether inside or outside the table.

Perhaps this is fixed in 4.3/4.4 now? Jean-P says he can repro in 4.3.5, but I'm not seeing it.
I'll Resolve as WFM. Set back to UNCONFIRMED if you can still see the problem with 4.4.0.1 or later.
Comment 5 Joanmarie Diggs 2015-01-17 18:19:24 UTC
I can confirm that this is working with the nightly version of LibreOffice Writer. Orca is presenting the table cell contents now. Thanks!
Comment 6 Jean-Philippe MENGUAL 2015-01-21 03:27:36 UTC
Hi,

While the things worked fine /ith 4.2.8.2, the bug appears in 4.3.0.1. Something happened in Writer which created a regression.

What kind of output could help?

Regards,
Comment 7 Robinson Tryon (qubit) 2015-01-21 03:37:31 UTC
(In reply to Jean-Philippe MENGUAL from comment #6)
> Hi,
> 
> While the things worked fine /ith 4.2.8.2, the bug appears in 4.3.0.1.
> Something happened in Writer which created a regression.
> 
> What kind of output could help?

Please test with 4.3.6 -- if it's still there, we could theoretically investigate backporting a fix to 4.3
Comment 8 Jean-Philippe MENGUAL 2015-04-18 16:36:55 UTC
Hi,

I've just tested, the bug is still here on latest master, 5.0. Sorry but it's very boring for users to handle tables /ith this problem.

Best regards,
Comment 9 Niklas Johansson 2015-04-20 19:19:16 UTC
I can confirm that there are still problems in this area but not always. If I open the test case file and press down-arrow i do get carret-moved events but if I start by pressing right arrow 8 times and then down arrow then the problem is back.

So steps to reproduce:
1. Open the attached document
2. Launch the attached accessible-event listener in a terminal
3. Press right arrow 8 times
4. Press down arrow 2 times
Comment 10 Matthew Francis 2015-04-21 23:48:18 UTC
I couldn't reproduce text-caret-moved not being emitted while moving in the table.


I did see that moving downwards sometimes emitted duplicate events, which I guess is unexpected

That is to say, moving upwards within a table cell made the attached script output e.g.

object:text-caret-moved(-1, 0, 0)
	source: [paragraph | ]
	host_application: [application | soffice]
object:text-caret-moved(7, 0, 0)
	source: [paragraph | ]
	host_application: [application | soffice]


While moving downward within a table cell sometimes produced output like this:

object:text-caret-moved(-1, 0, 0)
	source: [paragraph | ]
	host_application: [application | soffice]
object:text-caret-moved(7, 0, 0)
	source: [paragraph | ]
	host_application: [application | soffice]
object:text-caret-moved(7, 0, 0)
	source: [paragraph | ]
	host_application: [application | soffice]
Comment 11 Alex ARNAUD 2016-04-20 09:48:54 UTC
In LibreOffice 5.1.1 I'm able to reproduce.

Steps :
1) Open the document
2) Launch the script
3) Move down (event should appear)
4) Move down to the second line : no event appears

We are some people able to reproduce the bug so It seems it was confirmed.
Comment 12 QA Administrators 2017-05-22 13:24:19 UTC Comment hidden (obsolete)
Comment 13 Alex ARNAUD 2017-05-30 16:21:54 UTC
Dear all,

The issue is still present on LibreOfficeDev 5.5 from 2017-05-30.

Best regards.
Comment 14 Caolán McNamara 2017-11-07 16:23:21 UTC
I think there's a race here, and some degree of the window size matters probably too. Under no load this works for me, but if things are slowed down, e.g. by the presence of a screen reader working then when the cursor enters the table the table toolbar appears at the bottom of the window and the viewport of the document changes which causes the a11y cells contexts to be destroyed.
Comment 15 Buovjaga 2018-07-08 17:43:00 UTC
Bisected on Ubuntu 14.04 (w/ Orca) with 43max to:
commit 69a440abc1db5fd999eae36b86e5098c67a5ca13
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 17:35:24 2015 +0800

    source-hash-76c549eb01dcb7b5bf28a271ce00e386f3d388ba
    
    commit 76c549eb01dcb7b5bf28a271ce00e386f3d388ba
    Author:     Steve Yin <steve_y@apache.org>
    AuthorDate: Fri Nov 29 13:03:27 2013 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Mon Dec 2 10:25:33 2013 +0000
    
        Integrate branch of IAccessible2
Comment 16 am_dxer 2018-07-09 16:20:51 UTC
*** Bug 105487 has been marked as a duplicate of this bug. ***
Comment 17 QA Administrators 2019-07-10 02:53:18 UTC Comment hidden (obsolete)
Comment 18 Michael Weghorn 2022-02-18 10:39:26 UTC
I've started looking at this in the context of bug 147084, with the document attached there, but the issue appears to be the same regardless of the document. 
(However, the NVDA on Windows issue handled in bug 147084 has a different root cause from the Orca on Linux one covered here.)

From my observations with current LO master so far, the race only occurs when using Orca, not e.g. just SAL_ACCESSIBILITY_ENABLED=1, and the issue seems to be reliably reproducible e.g. with the steps described in comment 9 if Orca is enabled.
What seems to happen is that a11y objects for paragraphs are created as response to queries from Orca via AT-SPI, and if that happens, no accessible event listeners are registered on (some of) the involved a11y objects, so no events get sent when the cursor/caret moves into the corresponding paragraphs.

I have an idea for potential approaches to fix that, plan to look further into that as I find time.
Comment 19 Michael Weghorn 2023-04-09 05:12:23 UTC
Unassigning for now, but I might come back to that at some point in time unless anybody else finds time earlier.