diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-10-21 14:53:17 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-21 14:53:17 -0400 |
commit | 8f100269ad5f7d236560a2c83db73be4005529bc (patch) | |
tree | 02899bb570ddb3b8ba2be5cfe3467165bb28d557 /gtk/gtkscale.c | |
parent | 48bb9200d913607cf0556c55c7da968bdb36024a (diff) | |
download | gtk+-8f100269ad5f7d236560a2c83db73be4005529bc.tar.gz |
scale: Hide internal structure from a11y
According to section 7.1 of WAI-ARIA, the slider role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree, which makes sense, since these are all
just internal gizmos.
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r-- | gtk/gtkscale.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index d9928636cf..af17b39af2 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -1698,12 +1698,13 @@ gtk_scale_add_mark (GtkScale *scale, { if (!priv->top_marks_widget) { - priv->top_marks_widget = gtk_gizmo_new ("marks", - gtk_scale_measure_marks, - gtk_scale_allocate_marks, - NULL, - NULL, - NULL, NULL); + priv->top_marks_widget = gtk_gizmo_new_with_role ("marks", + GTK_ACCESSIBLE_ROLE_NONE, + gtk_scale_measure_marks, + gtk_scale_allocate_marks, + NULL, + NULL, + NULL, NULL); gtk_widget_insert_after (priv->top_marks_widget, GTK_WIDGET (scale), @@ -1716,12 +1717,13 @@ gtk_scale_add_mark (GtkScale *scale, { if (!priv->bottom_marks_widget) { - priv->bottom_marks_widget = gtk_gizmo_new ("marks", - gtk_scale_measure_marks, - gtk_scale_allocate_marks, - NULL, - NULL, - NULL, NULL); + priv->bottom_marks_widget = gtk_gizmo_new_with_role ("marks", + GTK_ACCESSIBLE_ROLE_NONE, + gtk_scale_measure_marks, + gtk_scale_allocate_marks, + NULL, + NULL, + NULL, NULL); gtk_widget_insert_before (priv->bottom_marks_widget, GTK_WIDGET (scale), |