Skip to content

gtk: Add AccessibleList to enable relations in bindings

Evan Welsh requested to merge ewlsh/add-accessible-relation-list into main

MR demonstrating the boxed type approach to fixing #6358 (closed)

To support the existing signature of update_relation GJS and Python need a way to "wrap" lists/arrays like [label1, label2] in a type they know how to pass. A boxed type, Gtk.AccessibleList, works for this purpose:

widget.update_relation(Gtk.AccessibleRelation.LABELLED_BY, new Gtk.AccessibleList([label1, label2]);

In GJS we will likely add an override which implicitly handles this wrapping.

Edited by Evan Welsh

Merge request reports