Update the accessible description of MenuButton

We update the labelled-by relation, but we never update the described-by
one.

Fixes: #4576
This commit is contained in:
Emmanuele Bassi 2022-01-02 00:35:53 +00:00
parent 5301367630
commit 37063e7a05

View File

@ -1028,6 +1028,7 @@ gtk_menu_button_set_icon_name (GtkMenuButton *menu_button,
*/
gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button),
GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button, NULL,
GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, menu_button, NULL,
-1);
image_widget = g_object_new (GTK_TYPE_IMAGE,
@ -1164,6 +1165,7 @@ gtk_menu_button_set_label (GtkMenuButton *menu_button,
gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button),
GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button->label_widget, NULL,
GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, menu_button->label_widget, NULL,
-1);
menu_button->image_widget = NULL;