From f2a2e97004a80fa780281da62f08143c9c2d8dd5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Jun 2023 11:14:43 -0400 Subject: [PATCH] docs: Add guidance on container roles Provide some guidance on whether group or generic is a more suitable role for containers. --- docs/reference/gtk/section-accessibility.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/reference/gtk/section-accessibility.md b/docs/reference/gtk/section-accessibility.md index 878a5d0e1f..51839fcda0 100644 --- a/docs/reference/gtk/section-accessibility.md +++ b/docs/reference/gtk/section-accessibility.md @@ -257,6 +257,13 @@ turn automatically any widget into a `GtkButton`; but if your widget behaves like a button, using the %GTK_ACCESSIBLE_ROLE_BUTTON will allow any assistive technology to handle it like they would a `GtkButton`. +For widgets that act as containers of other widgets, you should use +%GTK_ACCESSIBLE_ROLE_GROUP if the grouping of the children is semantic +in nature; for instance, the children of a [class@Gtk.HeaderBar] are +grouped together on the header of a window. For generic containers that +only impose a layout on their children, you should use +%GTK_ACCESSIBLE_ROLE_GENERIC instead. + ### Attributes can both hide and enhance Accessible attributes can be used to override the content of a UI element, -- 2.30.2