Revert "colordialogbutton: Shuffle accessible roles around"
authorMatthias Clasen <mclasen@redhat.com>
Sun, 18 Jun 2023 11:35:52 +0000 (07:35 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 18 Jun 2023 11:35:52 +0000 (07:35 -0400)
This reverts commit 343b9d246ff09e24842020e907a681984ea6d610.

Unfortunately, this makes it so that the focus ends up on
the 'generic' accessible, not the one with the label, and
orca remains quiet.

gtk/gtkcolordialogbutton.c

index 8fdb63039696ae2873669e9237bea56675eec3e0..dce03690d1a508d34a65f513ae0f6d5b9ffae5c3 100644 (file)
@@ -110,9 +110,7 @@ gtk_color_dialog_button_init (GtkColorDialogButton *self)
 
   self->color = GDK_RGBA ("00000000");
 
-  self->button = g_object_new (GTK_TYPE_BUTTON,
-                               "accessible-role", GTK_ACCESSIBLE_ROLE_GENERIC,
-                               NULL);
+  self->button = gtk_button_new ();
   g_signal_connect_swapped (self->button, "clicked", G_CALLBACK (button_clicked), self);
   gtk_widget_set_parent (self->button, GTK_WIDGET (self));
 
@@ -282,7 +280,6 @@ gtk_color_dialog_button_class_init (GtkColorDialogButtonClass *class)
 
   gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
   gtk_widget_class_set_css_name (widget_class, "colorbutton");
-  gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_BUTTON);
 }
 
 /* }}} */