From abd5383d4075e580042e008cdc8cbf1a3ab5492c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 5 Nov 2020 13:57:50 +0000 Subject: [PATCH] docs: Add a section on accessible buttons Anything that behaves like a button should do so at the accessibility level as well. --- docs/reference/gtk/section-accessibility.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/reference/gtk/section-accessibility.md b/docs/reference/gtk/section-accessibility.md index c86eb3c3c1..efafadd512 100644 --- a/docs/reference/gtk/section-accessibility.md +++ b/docs/reference/gtk/section-accessibility.md @@ -298,6 +298,16 @@ When creating custom widgets, following established patterns can help ensuring that the widgets work well for users of accessible technologies as well. +### Buttons + +A button is a widget that enables users to trigger an action. While it is +recommended you use #GtkButton for anything that looks and behaves like a +button, it is possible to apply a button behavior to UI elements like images +by using a #GtkGestureClick gesture. When doing so, you should: + + - Give your widget the role %GTK_ACCESSIBLE_ROLE_BUTTON + - Install an action with no parameters, which will activate the widget + ### Custom entries For custom entries, it is highly recommended that you implement the