The tooltip text should only be considered after
all other means are exhausted. but it can be used
for both the name and the description.
See https://www.w3.org/TR/accname-1.2/
return;
}
+ if (names->len == 0)
+ {
+ if (GTK_IS_WIDGET (self->accessible))
+ {
+ const char *tooltip = gtk_widget_get_tooltip_text (GTK_WIDGET (self->accessible));
+ if (tooltip)
+ g_ptr_array_add (names, (char *) tooltip);
+ }
+ }
}
static void
if (gtk_boolean_accessible_value_get (value))
return;
}
+
+ if (labels->len == 0)
+ {
+ if (GTK_IS_WIDGET (self->accessible))
+ {
+ const char *tooltip = gtk_widget_get_tooltip_text (GTK_WIDGET (self->accessible));
+ if (tooltip)
+ g_ptr_array_add (labels, (char *) tooltip);
+ }
+ }
}
static GtkAccessibleRole name_forbidden[] = {
priv->tooltip_text = tooltip_text;
priv->tooltip_markup = tooltip_markup;
- gtk_accessible_update_property (GTK_ACCESSIBLE (widget),
- GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, priv->tooltip_text,
- -1);
-
gtk_widget_set_has_tooltip (widget, priv->tooltip_text != NULL);
if (_gtk_widget_get_visible (widget))
gtk_widget_trigger_tooltip_query (widget);