Bug 112894

Summary: find search entry has a broken accessibility hierarchy
Product: LibreOffice Reporter: Alex ARNAUD <foss>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: ilmari.lauhakangas, jdiggs, jean-philippe.mengual, m.weghorn, zolnaitamas2000
Priority: medium Keywords: accessibility
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=99687
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 36549, 102847    
Attachments: pyatspi events listener to reproduce the bug easily

Description Alex ARNAUD 2017-10-05 13:39:43 UTC
Description:
Dear all,

LibreOffice find search entry has a broken accessibility tree when it emits events so Orca screenreader cannot determine it's a LibreOffice event and doesn't present it to the user.
When the user write text in the find search entry and it want to read the text LibreOffice should emits caret-moved events, it the behavior we do since the fix of the bug #99687. Unfortunatly when the event is emitted the parent of the emitter is -1 so Orca can't present the information to the user. See the AT-SPI related documentation: https://lazka.github.io/pgi-docs/Atspi-2.0/classes/Accessible.html#Atspi.Accessible.get_index_in_parent

Steps to Reproduce:
1) Launch the attached event listener
2) Launch LibreOffice Writer
4) Press ctrl+f and type "test"
5) Press left or right arrow

Actual Results:  
LibreOffice sends the events and when the listener ask for the parent index it obtains "-1"

Expected Results:
LibreOffice should send the event and correctly set the parent index


Reproducible: Always

User Profile Reset: No

Additional Info:
Best regards.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Alex ARNAUD 2017-10-05 13:41:31 UTC
Created attachment 136779 [details]
pyatspi events listener to reproduce the bug easily
Comment 2 Buovjaga 2017-11-03 13:57:23 UTC
Repro (used SAL_USE_VCLPLUGIN=gtk3)

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: 64024d7c18bd114eb9958cf80eea9129e09923bd
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 3rd 2017
Comment 3 QA Administrators 2018-11-04 03:57:07 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2020-11-04 04:04:13 UTC Comment hidden (obsolete)
Comment 5 Michael Weghorn 2022-04-16 16:16:22 UTC
I can reproduce with an old version from the bibisect repo:

Version: 6.0.6.0.0+
Build ID: c6c82096301180cfa7942dd9fb9d1cb66c7ecc04
CPU threads: 4; OS: Linux 5.16; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); Calc: group

but everything looks fine with current git master, Orca speaks the corresponding character and the attached script prints 0 as index in parent, no more -1:

> object:text-caret-moved(1, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(2, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(3, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(4, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(3, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(2, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(1, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0
> object:text-caret-moved(0, 0, 0)
>         source: [text | ]
>         host_application: [application | soffice]
>         sender: [application | soffice]
> 0

-> Closing as WORKSFORME

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: de45c09a3b48e8ab3ac995ea72681ec265c24123
CPU threads: 4; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_GB.UTF-8); UI: en-US
Calc: threaded