a11y: Document GtkRevealer's accessible state

Use the GROUP role, and make sure to note that the child is always
revealed. Unlike GtkExpander, GtkRevealer can only be programmatically
toggled, so we cannot turn it into a "button" object.
This commit is contained in:
Emmanuele Bassi 2020-11-12 16:19:14 +00:00
parent 0d7fcdda28
commit b9ad3172a4

View File

@ -53,6 +53,13 @@
* When styling #GtkRevealer using CSS, remember that it only hides its contents,
* not itself. That means applied margin, padding and borders will be
* visible even when the #GtkRevealer:reveal-child property is set to %FALSE.
*
* # Accessibility
*
* GtkRevealer uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
*
* The child of GtkRevealer, if set, is always available in the accessibility
* tree, regardless of the state of the revealer widget.
*/
/**
@ -346,6 +353,7 @@ gtk_revealer_class_init (GtkRevealerClass *klass)
g_object_class_install_properties (object_class, LAST_PROP, props);
gtk_widget_class_set_css_name (widget_class, I_("revealer"));
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
}
/**