Bug 156609 - Calc table no longer implements the Atk/Atspi Table interface; breaks Orca functionality (gtk3, Fedora 38)
Summary: Calc table no longer implements the Atk/Atspi Table interface; breaks Orca fu...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.5.2 release
Hardware: All Linux (All)
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks: a11y-Linux GTK3
  Show dependency treegraph
 
Reported: 2023-08-04 13:54 UTC by Joanmarie Diggs
Modified: 2023-08-05 13:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing table interface with Accerciser with Debian-provided 7.5.5.2 (287.07 KB, image/png)
2023-08-04 17:00 UTC, Michael Weghorn
Details
Screenshot from Fedora 38 (397.08 KB, image/png)
2023-08-04 22:13 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2023-08-04 13:54:13 UTC
Description:
Calc tables used to support both the selection and table accessible interfaces. This is no longer the case. Only selection appears to be implemented. This breaks functionality in Orca that assumes tables will implement the table interface.

Steps to Reproduce:
1.Launch Calc
2.Launch the Accerciser accessibility inspector
3.Inspect the Calc table

Actual Results:
The table does not implement the table interface.

Expected Results:
The table does implement the table interface.


Reproducible: Always


User Profile Reset: No

Additional Info:
I (Orca maintainer) don't yet know what all might be broken as a consequence of this. It definitely breaks the command in which Orca speaks the selected cell range. :(
Comment 1 Julien Nabet 2023-08-04 14:58:07 UTC
Colomban/Michael: thought you might be interested here since it concerns accessibility + the fact that the reporter is the Orca's maintainer.
Comment 2 Michael Weghorn 2023-08-04 17:00:33 UTC
Created attachment 188776 [details]
Screenshot showing table interface with Accerciser with Debian-provided 7.5.5.2
Comment 3 Michael Weghorn 2023-08-04 17:03:20 UTC
(In reply to Joanmarie Diggs from comment #0)
> I (Orca maintainer) don't yet know what all might be broken as a consequence
> of this. It definitely breaks the command in which Orca speaks the selected
> cell range. :(

That would indeed be very unfortunate.
I can't reproduce here yet, though, with the Debian-packaged 7.5.5.2 on Debian testing and the gtk3 VCL plugin, s. screenshot attachment 188776 [details].

Where does your version come from (distro, LO website download)? Can you paste the information from Help > About LibreOffice?
Comment 4 Michael Weghorn 2023-08-04 17:06:30 UTC
@Joanmarie: As a side note, whenever reporting an Orca-related issue, feel free to add the "accessibility" keyword and/or add bug 36549 in the "Blocks" field, so people keeping track of those are notified right away.
Comment 5 Joanmarie Diggs 2023-08-04 22:13:29 UTC
Created attachment 188785 [details]
Screenshot from Fedora 38

Here's my corresponding screenshot.
Comment 6 Michael Weghorn 2023-08-05 11:23:58 UTC
I can reproduce in a Fedora 38 VM, with both, the Fedora-package LO as well as the TDF download. I don't see the problem with the same version (exact same binary) on Debian testing.

With the same LO version and the kf5 VCL plugin (SAL_USE_VCLPLUGIN=kf5), the Table interface is exposed just fine.

The "Editable Cells" sample from gtk3-demo also works fine (table interface is exposed) in my Fedora VM, so it's not a problem for gtk3 apps in general.

Maybe there is some difference in the gtk/atk stack triggering this issue in LO.

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 2; OS: Linux 6.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 Michael Weghorn 2023-08-05 11:45:42 UTC
(In reply to Joanmarie Diggs from comment #0)
> The table does not implement the table interface.
Seems that the Table interface is in general implemented, but something is broken that results in Accerciser not displaying it (and probably also Orca failing at some point). Querying the Table interface manually in Accerciser's IPython console generally works:

In [12]: acc.get_interfaces()
Out[13]: ['Accessible', 'Collection', 'Component', 'Selection', 'Table']
In [13]: acc.queryTable()
Out[14]: <pyatspi.table.Table at 0x7f099195b590>
In [14]: table = acc.queryTable()
In [15]: table.nRows
Out[16]: 1048576
In [16]: table.nColumns
Out[17]: 16384
Comment 8 Michael Weghorn 2023-08-05 13:01:40 UTC
Actually, the fact that Accerciser doesn't show the Table interface looks like an Accerciser bug: It errors out when handling the Selection interface, then doesn't handle any other interfaces any more.

The Table interface is shown just fine again for me when disabling the "problematic" part in Accerciser in a quick test:

diff --git a/plugins/interface_view.py b/plugins/interface_view.py
index f94519c..e450f03 100644
--- a/plugins/interface_view.py
+++ b/plugins/interface_view.py
@@ -917,10 +917,12 @@ class _SectionSelection(_InterfaceSection):
     '''
     if acc.childCount > 50:
       theme = gtk.IconTheme.get_default()
-      self.sel_model.append(
-        [theme.load_icon('gtk-dialog-warning', 24, 
-                         gtk.IconLookupFlags.USE_BUILTIN),
-         _('Too many selectable children'), None])
+      # DEMO: skip this, will show Table then...
+      # TODO: fix
+      #self.sel_model.append(
+      #  [theme.load_icon('gtk-dialog-warning', 24, 
+      #                   gtk.IconLookupFlags.USE_BUILTIN),
+      #   _('Too many selectable children'), None])
       # Set section as insensitive, but leave expander label sensitive.
       section_widgets = self.expander.get_children()
       section_widgets.remove(self.expander.get_label_widget())


I'll take a look at this on the Accerciser side, but to me, it looks unrelated to LO by itself, just triggers that path because a Calc table has more than 50 children.

@Joanmarie: Could you please check if the problem with selected cells announcement in Orca (if any) is actually related to this or has another root cause? (I currently can't check with Orca in my Fedora VM, doesn't have audio...)
Comment 9 Michael Weghorn 2023-08-05 13:57:31 UTC
(In reply to Michael Weghorn from comment #8)
> I'll take a look at this on the Accerciser side, but to me, it looks
> unrelated to LO by itself, just triggers that path because a Calc table has
> more than 50 children.

Accerciser merge request:
https://gitlab.gnome.org/GNOME/accerciser/-/merge_requests/30

With that in place, the Table interface is shown just fine on Fedora 38 as well, so I'm closing this as NOTOURBUG.

If there are other issues preventing Orca from properly announcing cells, please create a separate bug report for that.