Bug 124400 - Add stable widget IDs to ATK interface
Summary: Add stable widget IDs to ATK interface
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Samuel Thibault
Whiteboard: target:6.3.0
Keywords: accessibility, needsDevAdvice
Depends on:
Blocks: a11y
  Show dependency treegraph
Reported: 2019-03-28 16:03 UTC by Samuel Thibault
Modified: 2019-06-26 12:03 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Thibault 2019-03-28 16:03:15 UTC

Just like mentioned in https://gitlab.gnome.org/GNOME/atk/issues/4 and https://gitlab.gnome.org/GNOME/gtk/issues/1287 , libreoffice currently does not provide any stable id that could be used for identifying widgets in a stable manner. We would need this for proper regression testing, so we can check that for instance a well-known shortcut properly switches focus to a well-known widget, independently from the locale, from modifications of the label of the widget, and from modifications in the tree that leads to this widget. Screen reader scripts could also use it to be able to reach a widget which is known to provide some information. 

The way firefox exposes it is through an "id" attribute for the object, and that is also being implemented for gtk. We will need some implementation on the libreoffice side as well.

The "id" as found in the .ui files would be exactly what we need. AFAICT from the source code, it ends up in the maID field of vcl::Window, which can be obtained with the get_id() method. It seems it could be exposed in XAccessibleContext through a getId() method, that accessibility/source/extended/accessible* would implement. vcl/unx/gtk/a11y/atkwrapper.cxx's wrapper_get_attributes function would then be able to call it and append it to the attribute list before returning it to atk.

Does this sound like a plan?

Comment 1 Xisco Faulí 2019-05-06 17:07:42 UTC
Hello Samuel,
Does it make sense to ask in the dev list first to hear other devs opinion ?
Comment 2 Commit Notification 2019-05-09 11:40:28 UTC
Samuel Thibault committed a patch related to this issue.
It has been pushed to "master":


tdf#124400 a11y: add accessible ID

It will be available in 6.3.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:

Affected users are encouraged to test the fix and report feedback.
Comment 3 Xisco Faulí 2019-06-26 10:40:50 UTC
A polite ping to Samuel Thibault:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Comment 4 Samuel Thibault 2019-06-26 12:03:39 UTC
Ah, sorry, I didn't realize that I needed to mark the bug as resolved.