[gtk/ebassi/new-a11y: 15/32] a11y: Add roles to various widgets
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/new-a11y: 15/32] a11y: Add roles to various widgets
- Date: Fri, 17 Jul 2020 16:39:49 +0000 (UTC)
commit 44e4f413d6bdbde059c5353147dec494f85f43ef
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jul 13 16:03:27 2020 +0100
a11y: Add roles to various widgets
gtk/gtkbutton.c | 1 +
gtk/gtkcheckbutton.c | 1 +
gtk/gtkdialog.c | 2 ++
gtk/gtkprogressbar.c | 1 +
gtk/gtkradiobutton.c | 1 +
gtk/gtkscrollbar.c | 1 +
6 files changed, 7 insertions(+)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index d723eac0b6..3177d95fc2 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -291,6 +291,7 @@ gtk_button_class_init (GtkButtonClass *klass)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("button"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_BUTTON);
}
static void
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 19c49ebc12..9761dabebe 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -201,6 +201,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
gtk_widget_class_set_css_name (widget_class, I_("checkbutton"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_CHECKBOX);
}
static void
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index f4bc4515a0..eac6d9437d 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -553,6 +553,8 @@ gtk_dialog_class_init (GtkDialogClass *class)
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, action_area);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, content_area);
gtk_widget_class_bind_template_child_private (widget_class, GtkDialog, action_box);
+
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_DIALOG);
}
static void
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index f02702d34d..21c3b790f3 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -250,6 +250,7 @@ gtk_progress_bar_class_init (GtkProgressBarClass *class)
gtk_widget_class_set_css_name (widget_class, I_("progressbar"));
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_PROGRESS_BAR);
}
static void
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 1c02298b04..d304f0bfe6 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -229,6 +229,7 @@ gtk_radio_button_class_init (GtkRadioButtonClass *class)
G_TYPE_NONE, 0);
gtk_widget_class_set_css_name (widget_class, I_("radiobutton"));
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_RADIO);
}
static void
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index da489dc4f1..25dd7ff9cb 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -205,6 +205,7 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
gtk_widget_class_set_css_name (widget_class, I_("scrollbar"));
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
+ gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_SCROLLBAR);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]