summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-11-12 14:54:39 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2020-11-12 21:46:06 +0000
commitd4ddfdc265c33d5876e56f6faf243df48470fa13 (patch)
tree50b8b1e4952adde63765fd9bace1f067cf277cf8
parentf8bb2060343800e9a51013f61966f60a5caa6bb0 (diff)
downloadgtk+-d4ddfdc265c33d5876e56f6faf243df48470fa13.tar.gz
a11y: Set the role on GtkSearchBar
The search bar widget has a "SEARCH" landmark role, which is described as: A landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility.
-rw-r--r--gtk/gtksearchbar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index d7590bb707..c1a23bf304 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -82,6 +82,10 @@
* ## Creating a search bar
*
* [A simple example](https://gitlab.gnome.org/GNOME/gtk/tree/master/examples/search-bar.c)
+ *
+ * # Accessibility
+ *
+ * GtkSearchBar uses the %GTK_ACCESSIBLE_ROLE_SEARCH role.
*/
typedef struct _GtkSearchBarClass GtkSearchBarClass;
@@ -336,6 +340,7 @@ gtk_search_bar_class_init (GtkSearchBarClass *klass)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("searchbar"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_SEARCH);
}
static void