Merge branch 'static_text_widgets_are_not_special' into 'main'

a11y: Remove special handling of accessible names for static text widgets

See merge request GNOME/gtk!6776
This commit is contained in:
Matthias Clasen 2024-01-18 16:01:29 +00:00
commit 1fbc61f2cb
3 changed files with 10 additions and 16 deletions

View File

@ -1355,22 +1355,6 @@ gtk_at_context_get_text_accumulate (GtkATContext *self,
}
}
/* Step 2.G */
if (GTK_IS_LABEL (self->accessible))
{
const char *text = gtk_label_get_text (GTK_LABEL (self->accessible));
if (text && not_just_space (text))
append_with_space (res, text);
return;
}
else if (GTK_IS_INSCRIPTION (self->accessible))
{
const char *text = gtk_inscription_get_text (GTK_INSCRIPTION (self->accessible));
if (text && not_just_space (text))
append_with_space (res, text);
return;
}
/* Step 2.I */
if (GTK_IS_WIDGET (self->accessible))
{

View File

@ -805,6 +805,11 @@ gtk_inscription_set_text (GtkInscription *self,
gtk_widget_queue_draw (GTK_WIDGET (self));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TEXT]);
gtk_accessible_update_property (GTK_ACCESSIBLE (self),
GTK_ACCESSIBLE_PROPERTY_LABEL,
text,
-1);
}
/**

View File

@ -3086,6 +3086,11 @@ gtk_label_set_label_internal (GtkLabel *self,
g_object_notify_by_pspec (G_OBJECT (self), label_props[PROP_LABEL]);
gtk_accessible_update_property (GTK_ACCESSIBLE (self),
GTK_ACCESSIBLE_PROPERTY_LABEL,
self->label,
-1);
return TRUE;
}