dropdown: Shuffle accessible roles around

Make the internal toggle button generic, so that
the a11y checker doesn't complain about it not
having a label. And mark the icons in the popup
as presentational.
This commit is contained in:
Matthias Clasen 2023-06-17 22:38:43 -04:00
parent 343b9d246f
commit 5ec0b07baf
2 changed files with 5 additions and 1 deletions

View File

@ -695,7 +695,10 @@ setup_item (GtkSignalListItemFactory *factory,
label = gtk_label_new (NULL);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_box_append (GTK_BOX (box), label);
icon = gtk_image_new_from_icon_name ("object-select-symbolic");
icon = g_object_new (GTK_TYPE_IMAGE,
"icon-name", "object-select-symbolic",
"accessible-role", GTK_ACCESSIBLE_ROLE_NONE,
NULL);
gtk_box_append (GTK_BOX (box), icon);
gtk_list_item_set_child (list_item, box);
}

View File

@ -3,6 +3,7 @@
<template class="GtkDropDown" parent="GtkWidget">
<child>
<object class="GtkToggleButton" id="button">
<property name="accessible-role">generic</property>
<signal name="toggled" handler="button_toggled"/>
<child>
<object class="GtkBox">