mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
a11y: Add missing fallback for accessible-role getter
If the per-instance accessible role is unset, use the class role.
This commit is contained in:
parent
9052f6dafe
commit
8157717e03
@ -12607,11 +12607,17 @@ gtk_widget_get_accessible_role (GtkWidget *self)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (self);
|
||||
GtkATContext *context = gtk_accessible_get_at_context (GTK_ACCESSIBLE (self));
|
||||
GtkWidgetClassPrivate *class_priv;
|
||||
|
||||
if (context != NULL && gtk_at_context_is_realized (context))
|
||||
return gtk_at_context_get_accessible_role (context);
|
||||
|
||||
return priv->accessible_role;
|
||||
if (priv->accessible_role != GTK_ACCESSIBLE_ROLE_WIDGET)
|
||||
return priv->accessible_role;
|
||||
|
||||
class_priv = GTK_WIDGET_GET_CLASS (self)->priv;
|
||||
|
||||
return class_priv->accessible_role;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user