From: Matthias Clasen Date: Sun, 11 Jun 2023 16:37:06 +0000 (-0400) Subject: passwordentry: Change an accessible role X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~155^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=aada89335210ed2b09d8f956f7c6f4ec3b8a8bc8;p=gtk4.git passwordentry: Change an accessible role The caps-lock icon is really an alert. Maybe this is in vain, since orca ignores these images. --- diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c index 7cd496d45f..e88e2d14fe 100644 --- a/gtk/gtkpasswordentry.c +++ b/gtk/gtkpasswordentry.c @@ -208,7 +208,10 @@ gtk_password_entry_init (GtkPasswordEntry *entry) g_signal_connect_swapped (entry->entry, "notify::has-focus", G_CALLBACK (focus_changed), entry); g_signal_connect_swapped (entry->entry, "activate", G_CALLBACK (activate_cb), entry); - entry->icon = gtk_image_new_from_icon_name ("caps-lock-symbolic"); + entry->icon = g_object_new (GTK_TYPE_IMAGE, + "icon-name", "caps-lock-symbolic", + "accessible-role", GTK_ACCESSIBLE_ROLE_ALERT, + NULL); gtk_widget_set_tooltip_text (entry->icon, _("Caps Lock is on")); gtk_widget_add_css_class (entry->icon, "caps-lock-indicator"); gtk_widget_set_cursor (entry->icon, gtk_widget_get_cursor (entry->entry));