[gtk/ebassi/for-master: 11/11] a11y: Document GtkRevealer's accessible state
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/for-master: 11/11] a11y: Document GtkRevealer's accessible state
- Date: Thu, 12 Nov 2020 16:49:43 +0000 (UTC)
commit 4f0464c771e19c68b1a7fa92a7d90d245a516ad3
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Nov 12 16:19:14 2020 +0000
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.
gtk/gtkrevealer.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index 716228954c..f0627d456b 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]