diff --git a/gtk/gtkaccessiblevalue.c b/gtk/gtkaccessiblevalue.c index 45bf824648..5a4edd5d85 100644 --- a/gtk/gtkaccessiblevalue.c +++ b/gtk/gtkaccessiblevalue.c @@ -1445,11 +1445,10 @@ gtk_accessible_value_parse (const GtkAccessibleCollect *cstate, case GTK_ACCESSIBLE_COLLECT_REFERENCE: case GTK_ACCESSIBLE_COLLECT_REFERENCE_LIST: { + /* We do not error out, to let the caller code deal + * with the references themselves + */ res = NULL; - g_set_error (error, GTK_ACCESSIBLE_VALUE_ERROR, - GTK_ACCESSIBLE_VALUE_ERROR_INVALID_VALUE, - "Invalid relation “%s”", - str); } break; diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 8747e8efcd..aa85cb6ddb 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -8831,6 +8831,23 @@ gtk_widget_buildable_finish_accessibility_properties (GtkWidget *widget, continue; } + if (value == NULL) + { + GObject *obj = gtk_builder_get_object (accessibility_data->builder, + pinfo->value->str); + + if (obj == NULL) + { + g_warning ("Failed to find accessible object “%s” for relation “%s”", + pinfo->value->str, + pinfo->name); + continue; + } + + /* FIXME: Need to distinguish between refs and refslist types */ + value = gtk_reference_list_accessible_value_new (g_list_append (NULL, obj)); + } + gtk_at_context_set_accessible_relation (context, relation, value); gtk_accessible_value_unref (value); }