Bug 164294 - a11y: Pattern editor list in Impress "Slide Properties" dialog reports incorrect accessible child index
Summary: a11y: Pattern editor list in Impress "Slide Properties" dialog reports incorr...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:25.8.0
Keywords: accessibility
Depends on:
Blocks: a11y, Accessibility
  Show dependency treegraph
 
Reported: 2024-12-12 09:28 UTC by Michael Weghorn
Modified: 2024-12-13 07:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of current behavior shown in Accerciser (184.41 KB, image/png)
2024-12-12 09:28 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2024-12-12 09:28:40 UTC
Created attachment 198078 [details]
Screenshot of current behavior shown in Accerciser

# Steps to reproduce when using the qt6 VCL plugin on Linux:

1) start Impress
2) "Slide" > "Slide Properties"
3) switch to the "Background" tab
4) select "Pattern"
5) start Accerciser ( https://gitlab.gnome.org/GNOME/accerciser )
6) in Accerciser's treeview of the LO a11y hierarchy, navigate to and select the object representing the "Pattern Editor" (with role "list")
7) in Accerciser's IPython console: print the child index of the object

# Actual result:

A child index of -1 is reported.

    In [1]: acc.get_index_in_parent()
    Out[1]: -1

This is wrong, because the object has a parent, and is the first child (i.e. the child at index 0) of that parent:

    In [2]: acc.get_parent().get_child_at_index(0) == acc
    Out[2]: True

# Expected result:

The correct child index of 0 should be reported on the accessibility layer

The attached screenshot shows the current behavior.

Reporting incorrect indices can break assistive technology logic, e.g. breaks Accerciser's "Select object under mouse" or bookmark feature.


Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ba767f634384c7dca5cb42364e51bc1a8dbd1835
CPU threads: 32; OS: Linux 6.11; UI render: default; VCL: qt6 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2024-12-12 11:10:02 UTC
When using the qt6 VCL plugin and moving around in that "Pattern Editor", this is shown on stderr:

    warn:legacy.tools:173399:173399:svx/source/accessibility/svxpixelctlaccessiblecontext.cxx:224: 
    warn:legacy.osl:173399:173399:comphelper/source/misc/accessiblecomponenthelper.cxx:188: OCommonAccessibleComponent::getAccessibleIndexInParent: invalid creator!

At least the second warning of these two is related.
Comment 2 Commit Notification 2024-12-12 22:00:04 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6a68b96c6a449f3861cda5af8e77dbe15dcce5d6

tdf#164294 a11y: Don't rely on "creator" to determine child index

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.