diff --git a/gtk/a11y/gtkcontaineraccessible.c b/gtk/a11y/gtkcontaineraccessible.c index a8a1615d3c..ae01adc87a 100644 --- a/gtk/a11y/gtkcontaineraccessible.c +++ b/gtk/a11y/gtkcontaineraccessible.c @@ -166,8 +166,6 @@ gtk_container_accessible_real_initialize (AtkObject *obj, if (GTK_IS_TOOLBAR (data)) obj->role = ATK_ROLE_TOOL_BAR; - else if (GTK_IS_VIEWPORT (data)) - obj->role = ATK_ROLE_VIEWPORT; else obj->role = ATK_ROLE_PANEL; } diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 6d313d95cb..7319841030 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -139,6 +139,8 @@ gtk_viewport_class_init (GtkViewportClass *class) widget_class->get_preferred_width = gtk_viewport_get_preferred_width; widget_class->get_preferred_height = gtk_viewport_get_preferred_height; + gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_VIEWPORT); + container_class->add = gtk_viewport_add; /* GtkScrollable implementation */