diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-11-05 13:19:26 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-11-05 13:25:53 +0000 |
commit | 88116712f6508ee7d48fa991ce8335b1b9d6b95b (patch) | |
tree | 09c7ae1055f669112b0e0f6cd814dfd9a7d257ec /gtk/gtktreeexpander.c | |
parent | 7dfa41bbc48f35669859274e166c87c686e0e479 (diff) | |
download | gtk+-88116712f6508ee7d48fa991ce8335b1b9d6b95b.tar.gz |
a11y: Use "presentation" role instead of "hidden" state
The intended use case of the "presentation" role is
| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.
One of the examples is, literally:
| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);
Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
Diffstat (limited to 'gtk/gtktreeexpander.c')
-rw-r--r-- | gtk/gtktreeexpander.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk/gtktreeexpander.c b/gtk/gtktreeexpander.c index 9ff4e6ac35..ec57b28ced 100644 --- a/gtk/gtktreeexpander.c +++ b/gtk/gtktreeexpander.c @@ -201,14 +201,13 @@ gtk_tree_expander_update_for_list_row (GtkTreeExpander *self) child = gtk_widget_get_prev_sibling (child); else { - GtkWidget *indent = gtk_builtin_icon_new ("indent"); + GtkWidget *indent = + g_object_new (GTK_TYPE_BUILTIN_ICON, + "css-name", "indent", + "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION, + NULL); gtk_widget_insert_after (indent, GTK_WIDGET (self), NULL); - - /* The indent icon is not visible in the accessibility tree */ - gtk_accessible_update_state (GTK_ACCESSIBLE (indent), - GTK_ACCESSIBLE_STATE_HIDDEN, TRUE, - -1); } } |