After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794513 - Setting accessible-role does not work
Setting accessible-role does not work
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-03-20 09:57 UTC by Samuel Thibault
Modified: 2018-03-22 14:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (1.51 KB, application/octet-stream)
2018-03-20 09:57 UTC, Samuel Thibault
  Details
testcase (739 bytes, text/plain)
2018-03-20 09:58 UTC, Samuel Thibault
  Details
Fix as a git patch (1.89 KB, patch)
2018-03-20 15:26 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
committed Details | Review

Description Samuel Thibault 2018-03-20 09:57:27 UTC
Created attachment 369897 [details]
proposed fix

Hello,

Some dialog boxes use labels for static information, e.g. printer
status, replace result, etc.  For the screen reader to properly
understand that, it should have role ATK_ROLE_STATIC.  There is

        <child internal-child="accessible">
                <object class="AtkObject">
                        <property name="AtkObject::accessible-role">static</property>
                </object>
        </child>

But it currently doesn't work:

  “"accessible-role" is supposed to be an int, not a string”

Matthias Clasen said on the list that this is because it should actually be an enum, not an int.  The attached patch does this, and it does fix the issue indeed.

Samuel
Comment 1 Samuel Thibault 2018-03-20 09:58:22 UTC
Created attachment 369898 [details]
testcase

And here is a testcase, which can be run with glade-previewer --filename test.glade and tested in accerciser that the role of the label becomes "static".
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2018-03-20 12:18:02 UTC
Comment on attachment 369897 [details]
proposed fix

The patch looks good. Feel free to commit it on master.

BTW, I was not able to review it using the bugzilla review tool, as it appears to have a wrong format. I think that it is as easy as uploading them as "name.patch" instead of just "patch".
Comment 3 Samuel Thibault 2018-03-20 12:26:05 UTC
(just to be sure: I don't have commit access, so somebody else has to do it)
Comment 4 Alejandro Piñeiro Iglesias (IRC: infapi00) 2018-03-20 15:26:14 UTC
Created attachment 369915 [details] [review]
Fix as a git patch

> (just to be sure: I don't have commit access, so somebody else has to do it)

I'm uploading the patch again to be sure that I'm using the correct name and email address. If you are ok with it, I will push this patch.

Thanks.
Comment 5 Samuel Thibault 2018-03-20 16:26:46 UTC
Yes it is fine, thanks!
Comment 6 Alejandro Piñeiro Iglesias (IRC: infapi00) 2018-03-21 06:10:10 UTC
(In reply to Samuel Thibault from comment #5)
> Yes it is fine, thanks!

Just committed. Thanks for the patch.
Comment 7 Rico Tzschichholz 2018-03-22 14:13:40 UTC
This "ABI break" doesnt change atk_object_real_get_property accordingly

     case PROP_ROLE:
-      g_value_set_int (value, atk_object_get_role (accessible));
+      g_value_set_enum (value, atk_object_get_role (accessible));
       break;
Comment 8 Samuel Thibault 2018-03-22 14:22:20 UTC
Ah, that's needed indeed.
Comment 9 Alejandro Piñeiro Iglesias (IRC: infapi00) 2018-03-22 14:27:00 UTC
Just fixed with this commit:

https://git.gnome.org/browse/atk/commit/?id=30399c42a524af14a48a227ccd5f588ac54b51eb

Closing again.