Bug 86661 - Incorrect usage of ATK_ROLE_TEXT
Summary: Incorrect usage of ATK_ROLE_TEXT
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 36549
  Show dependency treegraph
 
Reported: 2014-11-24 12:51 UTC by Joanmarie Diggs
Modified: 2015-01-19 16:34 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Joanmarie Diggs 2014-11-24 12:51:39 UTC
Steps to reproduce:
1. Launch Writer and type some text.
2. Use find and replace to do a "replace all"
3. Use Accerciser to examine the resulting results dialog (where it says Search key replaced x times.")

Expected results: There would not be any object with ROLE_TEXT.

Actual results: The accessible object containing the string "Search key replaced 8 times" has ROLE_TEXT.

Impact: Orca does not present the results string because ROLE_TEXT is typically used for GtkTextView (e.g. the entire text widget in Gedit, which is GNOME's Notepad equivalent). For static text in dialogs, ROLE_LABEL is traditionally used.

There has admittedly been some confusion about what ROLE_TEXT is applicable to. We have done a couple of things in this regard: 1) Clarified this in the ATK documentation and 2) Created a new role (ATK_ROLE_STATIC). [1]

It would be very helpful if you could either use the new ATK_ROLE_STATIC (introduced in ATK v2.15.2) or the very old ATK_ROLE_LABEL to be consistent with our platform's usage of ROLE_TEXT.

On a related note, apparently IA2 has a text frame role which is appropriate for things like static text in a dialog. The IA2 text frame role in most -- if not all -- cases is NOT the same as ATK_ROLE_TEXT. Thus if the reason ROLE_TEXT was used was because of this presumed equivalency, then it would probably be worth doing a thorough search and correction for ATK.

[1] https://developer.gnome.org/atk/2.15/AtkObject.html#AtkRole
Comment 1 V Stuart Foote 2014-11-24 13:54:39 UTC
Thanks for posting, setting to new.
Comment 2 Julien Nabet 2014-11-24 19:23:51 UTC
JoanMarie: just to complete information, on which LO version are you? FYI, last stable one is 4.3.4
Comment 3 Niklas Johansson 2014-11-25 09:42:28 UTC
Right, I noticed this when trying to fix the issue with the text in message boxes being exposed as password text. As I remember it LibreOffice uses VclMultiLineEdit for the text. At first the intention was to change the role to ROLE_LABEL for labels and text like the ones described below, but I didn't find a good way to change it without the side effect that objects that should be exposed as ROLE_TEXT also would be changed to ROLE_LABEL. Since it at least was possible to get the text read I left it alone.

Maybe what we really want is to create a new class VclMultiLineLabel that inherits VclMultiLineEdit?

Note, I'm out on deep water here so my observations may very well be wrong.

Since I haven't been in contact with ATK_ROLE_STATIC before I won't comment on the differentiation between ATK_ROLE_STATIC and ROLE_LABEL at the moment.
Comment 4 Caolán McNamara 2015-01-19 16:34:35 UTC
Assuming this is a MessageDialog, there would be no problem at all to just call "SetAccessibileRole on the m_pPrimaryMessage and m_pSecondaryMessage widgets in MessageDialog::Execute if that solves the problem. They are merely r/o MultiLineEdits in order to allow the user to select and copy the text out of them.

or if its an InfoBox/etc, convert it to a MessageDialog if they work better, and/or do both if necessary.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.