summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-11-11 17:54:57 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2020-11-11 18:33:15 +0000
commit40c0826921d9d59fe4a165fa1717e23cc9ceedb7 (patch)
treeb9d304db462ab7be34900d306e6e25854650d6ef
parent27b9b2e76c9b938927a5bcb9200e119c773fefc3 (diff)
downloadgtk+-40c0826921d9d59fe4a165fa1717e23cc9ceedb7.tar.gz
a11y: Mark more containers as structural elements
Widgets that just provide grouping and layout to other widgets should not be relevant to the accessible tree.
-rw-r--r--gtk/gtkaspectframe.c1
-rw-r--r--gtk/gtkbox.c1
-rw-r--r--gtk/gtkcenterbox.c1
-rw-r--r--gtk/gtkgrid.c2
-rw-r--r--gtk/gtkheaderbar.c1
-rw-r--r--gtk/gtkscrolledwindow.c1
-rw-r--r--gtk/gtkviewport.c1
-rw-r--r--gtk/gtkwindowcontrols.c1
-rw-r--r--gtk/gtkwindowhandle.c1
9 files changed, 9 insertions, 1 deletions
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c
index ad6049ffe9..916f307daf 100644
--- a/gtk/gtkaspectframe.c
+++ b/gtk/gtkaspectframe.c
@@ -176,6 +176,7 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (class), I_("aspectframe"));
+ gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (class), GTK_ACCESSIBLE_ROLE_GROUP);
}
static void
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index b23d523ac2..39aafdecd8 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -278,6 +278,7 @@ gtk_box_class_init (GtkBoxClass *class)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("box"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static void
gtk_box_init (GtkBox *box)
diff --git a/gtk/gtkcenterbox.c b/gtk/gtkcenterbox.c
index 76f07ad6ba..097d135017 100644
--- a/gtk/gtkcenterbox.c
+++ b/gtk/gtkcenterbox.c
@@ -210,6 +210,7 @@ gtk_center_box_class_init (GtkCenterBoxClass *klass)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_CENTER_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("box"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static void
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 3a5b6a7a95..4c21f29806 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -395,8 +395,8 @@ gtk_grid_class_init (GtkGridClass *class)
g_object_class_install_properties (object_class, N_PROPERTIES, obj_properties);
gtk_widget_class_set_css_name (widget_class, I_("grid"));
-
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_GRID_LAYOUT);
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static GtkBuildableIface *parent_buildable_iface;
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 8147a86496..745d5ce672 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -600,6 +600,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("headerbar"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static void
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index afa250c846..52a8ac77d4 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -868,6 +868,7 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
add_tab_bindings (widget_class, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
gtk_widget_class_set_css_name (widget_class, I_("scrolledwindow"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static gboolean
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 43df2cddae..8fdef6123d 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -382,6 +382,7 @@ gtk_viewport_class_init (GtkViewportClass *class)
GTK_PARAM_READWRITE));
gtk_widget_class_set_css_name (widget_class, I_("viewport"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static void
diff --git a/gtk/gtkwindowcontrols.c b/gtk/gtkwindowcontrols.c
index d2b3667555..7278dfafff 100644
--- a/gtk/gtkwindowcontrols.c
+++ b/gtk/gtkwindowcontrols.c
@@ -538,6 +538,7 @@ gtk_window_controls_class_init (GtkWindowControlsClass *klass)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("windowcontrols"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static void
diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c
index 18919becac..fca0c3440d 100644
--- a/gtk/gtkwindowhandle.c
+++ b/gtk/gtkwindowhandle.c
@@ -550,6 +550,7 @@ gtk_window_handle_class_init (GtkWindowHandleClass *klass)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("windowhandle"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
static void