a11y: Use undefined as default for string attributes

Instead of an empty string.
This commit is contained in:
Emmanuele Bassi 2020-07-28 13:27:05 +01:00
parent 4fa891b55d
commit 7f04faf30d
2 changed files with 4 additions and 4 deletions

View File

@ -1332,7 +1332,7 @@ gtk_accessible_value_get_default_for_property (GtkAccessibleProperty property)
case GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER:
case GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION:
case GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT:
return gtk_string_accessible_value_new ("");
return gtk_undefined_accessible_value_new ();
/* Token properties */
case GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE:
@ -1437,7 +1437,7 @@ gtk_accessible_value_get_default_for_relation (GtkAccessibleRelation relation)
/* Strings */
case GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT:
case GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT:
return gtk_string_accessible_value_new ("");
return gtk_undefined_accessible_value_new ();
default:
g_critical ("Unknown value for accessible property “%s”", cstate->name);

View File

@ -300,7 +300,7 @@ test_string_property (gconstpointer data)
gtk_test_accessible_assert_role (object, GTK_ACCESSIBLE_ROLE_CHECKBOX);
gtk_test_accessible_assert_property (object, property, "");
gtk_test_accessible_assert_property (object, property, NULL);
gtk_accessible_update_property (GTK_ACCESSIBLE (object),
property, "some string that holds no particular value",
@ -538,7 +538,7 @@ test_string_relation (gconstpointer data)
gtk_test_accessible_assert_role (object, GTK_ACCESSIBLE_ROLE_CHECKBOX);
gtk_test_accessible_assert_relation (object, relation, "");
gtk_test_accessible_assert_relation (object, relation, NULL);
gtk_accessible_update_relation (GTK_ACCESSIBLE (object),
relation, "some string that holds no particular value",