GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels

That improves the reading of the GtkStackSidebar widget considerably.
Previously, Orca would not read the items at all, now it does.
This commit is contained in:
Lukáš Tyrychtr 2023-06-15 14:29:31 +02:00
parent 447d1fab62
commit 29cf15a444

View File

@ -220,6 +220,12 @@ add_child (guint position,
row = gtk_list_box_row_new (); row = gtk_list_box_row_new ();
gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), item); 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); page = g_list_model_get_item (G_LIST_MODEL (self->pages), position);
update_row (self, page, row); update_row (self, page, row);