From: Lukáš Tyrychtr Date: Thu, 23 Feb 2023 14:02:29 +0000 (+0100) Subject: Use the correct role for GtkToggleButton X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~6^2~38^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6fa8033c7c7c05f33a6d43cb4030201d80a26529;p=gtk4.git Use the correct role for GtkToggleButton --- diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index d8c41d58dc..72d305eb71 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -67,6 +67,10 @@ * `GtkToggleButton` has a single CSS node with name button. To differentiate * it from a plain `GtkButton`, it gets the `.toggle` style class. * + * ## Accessibility + * + * `GtkToggleButton` uses the %GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON role. + * * ## Creating two `GtkToggleButton` widgets. * * ```c @@ -311,6 +315,8 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class) G_TYPE_NONE, 0); gtk_widget_class_set_css_name (widget_class, I_("button")); + + gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON); } static void