[gtk/ebassi/for-master: 4/4] docs: Add a section on accessible buttons
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/for-master: 4/4] docs: Add a section on accessible buttons
- Date: Thu, 5 Nov 2020 14:09:07 +0000 (UTC)
commit abd5383d4075e580042e008cdc8cbf1a3ab5492c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Nov 5 13:57:50 2020 +0000
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]