[libadwaita/wip/exalm/a11y-fixes: 5/11] window-mixin: Set up widget roles




commit fd0097c7deb5f367c46867110a919ed8ff2cab88
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Dec 27 17:49:41 2021 +0500

    window-mixin: Set up widget roles

 src/adw-window-mixin.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/adw-window-mixin.c b/src/adw-window-mixin.c
index 5efa0180..f7fc47df 100644
--- a/src/adw-window-mixin.c
+++ b/src/adw-window-mixin.c
@@ -70,13 +70,15 @@ adw_window_mixin_new (GtkWindow      *window,
   self->window = window;
   self->klass = klass;
 
-  self->titlebar = adw_gizmo_new ("nothing", NULL, NULL, NULL, NULL, NULL, NULL);
+  self->titlebar = adw_gizmo_new_with_role ("nothing", GTK_ACCESSIBLE_ROLE_PRESENTATION,
+                                            NULL, NULL, NULL, NULL, NULL, NULL);
   gtk_widget_hide (self->titlebar);
   gtk_window_set_titlebar (self->window, self->titlebar);
 
-  self->child = adw_gizmo_new ("contents", NULL, NULL, NULL, NULL,
-                               (AdwGizmoFocusFunc) adw_widget_focus_child,
-                               (AdwGizmoGrabFocusFunc) adw_widget_grab_focus_child);
+  self->child = adw_gizmo_new_with_role ("contents", GTK_ACCESSIBLE_ROLE_GROUP,
+                                         NULL, NULL, NULL, NULL,
+                                         (AdwGizmoFocusFunc) adw_widget_focus_child,
+                                         (AdwGizmoGrabFocusFunc) adw_widget_grab_focus_child);
   gtk_widget_set_layout_manager (self->child, gtk_bin_layout_new ());
   gtk_window_set_child (window, self->child);
 


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