GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels
authorLukáš Tyrychtr <ltyrycht@redhat.com>
Thu, 15 Jun 2023 12:29:31 +0000 (14:29 +0200)
committerLukáš Tyrychtr <ltyrycht@redhat.com>
Thu, 15 Jun 2023 12:29:31 +0000 (14:29 +0200)
That improves the reading of the GtkStackSidebar widget considerably.
Previously, Orca would not read the items at all, now it does.

gtk/gtkstacksidebar.c

index 22e0989bc24cc91b10cc65fa387ad00c5dd998b6..146d6b699864ec450fbe75eb9c615bc3539696a7 100644 (file)
@@ -220,6 +220,12 @@ add_child (guint            position,
   row = gtk_list_box_row_new ();
   gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), item);
 
+  gtk_accessible_update_relation (GTK_ACCESSIBLE (row),
+                                  GTK_ACCESSIBLE_RELATION_LABELLED_BY,
+                                  item,
+                                  NULL,
+                                  -1);
+
   page = g_list_model_get_item (G_LIST_MODEL (self->pages), position);
   update_row (self, page, row);