[gtk/gtk-4-6: 1/2] Make the presentation of the stack sidebar listbox nicer for A11Y




commit 447d79d90865649bd89fe7b7e16bf44fb1c7ddc6
Author: Lukáš Tyrychtr <lukastyrychtr gmail com>
Date:   Thu Apr 21 17:55:39 2022 +0200

    Make the presentation of the stack sidebar listbox nicer for A11Y
    
    This backports the fix for #4577.

 gtk/gtkstacksidebar.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c
index 49d26de430..9d73e9c270 100644
--- a/gtk/gtkstacksidebar.c
+++ b/gtk/gtkstacksidebar.c
@@ -34,6 +34,8 @@
 #include "gtkwidgetprivate.h"
 #include "gtkintl.h"
 
+#include <glib/gi18n-lib.h>
+
 /**
  * GtkStackSidebar:
  *
@@ -148,6 +150,11 @@ gtk_stack_sidebar_init (GtkStackSidebar *self)
 
   self->list = GTK_LIST_BOX (gtk_list_box_new ());
   gtk_widget_add_css_class (GTK_WIDGET (self->list), "navigation-sidebar");
+  gtk_accessible_update_property (GTK_ACCESSIBLE (self->list),
+                                  GTK_ACCESSIBLE_PROPERTY_LABEL,
+                                  C_("accessibility", "Sidebar"),
+                                  -1);
+
 
   gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), GTK_WIDGET (self->list));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]