Commit 14a64c73 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

levelbar: Hide internal structure from a11y

According to section 7.1 of WAI-ARIA, the meter role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
parent ca9b0687
......@@ -540,7 +540,9 @@ update_block_nodes (GtkLevelBar *self)
self->block_widget = g_renew (GtkWidget*, self->block_widget, n_blocks);
for (i = self->n_blocks; i < n_blocks; i++)
{
self->block_widget[i] = gtk_gizmo_new ("block", NULL, NULL, NULL, NULL, NULL, NULL);
self->block_widget[i] = gtk_gizmo_new_with_role ("block",
GTK_ACCESSIBLE_ROLE_NONE,
NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_insert_before (self->block_widget[i], GTK_WIDGET (self->trough_widget), NULL);
}
self->n_blocks = n_blocks;
......@@ -1024,12 +1026,13 @@ gtk_level_bar_init (GtkLevelBar *self)
self->inverted = FALSE;
self->trough_widget = gtk_gizmo_new ("trough",
gtk_level_bar_measure_trough,
gtk_level_bar_allocate_trough,
gtk_level_bar_render_trough,
NULL,
NULL, NULL);
self->trough_widget = gtk_gizmo_new_with_role ("trough",
GTK_ACCESSIBLE_ROLE_NONE,
gtk_level_bar_measure_trough,
gtk_level_bar_allocate_trough,
gtk_level_bar_render_trough,
NULL,
NULL, NULL);
gtk_widget_set_parent (self->trough_widget, GTK_WIDGET (self));
gtk_level_bar_ensure_offset (self, GTK_LEVEL_BAR_OFFSET_LOW, 0.25);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment