mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
modelbutton: Explicitly set up LABELLED-By relation
GTK does this automatically based on mnemonics, but only if the string actually contains a mnemonic. This makes orca read out menuitems, as expected.
This commit is contained in:
parent
61e08baec1
commit
6cd3bc7384
@ -681,6 +681,11 @@ gtk_model_button_set_text (GtkModelButton *button,
|
||||
gtk_label_set_text_with_mnemonic (GTK_LABEL (button->label),
|
||||
text ? text : "");
|
||||
update_visibility (button);
|
||||
|
||||
gtk_accessible_update_relation (GTK_ACCESSIBLE (button),
|
||||
GTK_ACCESSIBLE_RELATION_LABELLED_BY, g_list_append (NULL, button->label),
|
||||
-1);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (button), properties[PROP_TEXT]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user