[gtk/matthiasc/for-master] linkbutton: Use the LINK role



commit b6692a25b4aebcf218b3d20b29872938fad3e029
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 21 21:54:17 2020 -0400

    linkbutton: Use the LINK role
    
    It is a bit ambiguous, but I think link buttons are
    more links than buttons. See WAI-ARIA for a discussion
    of the differences.

 docs/reference/gtk/section-accessibility.md | 1 +
 gtk/gtkenums.h                              | 2 +-
 gtk/gtklinkbutton.c                         | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/gtk/section-accessibility.md b/docs/reference/gtk/section-accessibility.md
index 5ba59a5a46..c86eb3c3c1 100644
--- a/docs/reference/gtk/section-accessibility.md
+++ b/docs/reference/gtk/section-accessibility.md
@@ -54,6 +54,7 @@ Each role name is part of the #GtkAccessibleRole enumeration.
 | `GRID_CELL` | An item in a grid | #GtkFlowBoxChild, #GtkGridView, #GtkColumnView |
 | `IMG` | An image | #GtkImage, #GtkPicture |
 | `LABEL` | A visible name or caption for a user interface component | #GtkLabel |
+| `LINK` | A clickable hyperlink | #GtkLinkButton |
 | `LIST` | A list of items | #GtkListBox |
 | `LIST_ITEM` | An item in a list | #GtkListBoxRow |
 | `MENU` | A menu | #GtkPopoverMenu |
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h
index 40c793a8a1..9a64124c49 100644
--- a/gtk/gtkenums.h
+++ b/gtk/gtkenums.h
@@ -1183,7 +1183,7 @@ typedef enum {
  * @GTK_ACCESSIBLE_ROLE_LABEL: A visible name or caption for a user interface component.
  * @GTK_ACCESSIBLE_ROLE_LANDMARK: Abstract role.
  * @GTK_ACCESSIBLE_ROLE_LEGEND: Unused
- * @GTK_ACCESSIBLE_ROLE_LINK: Unused
+ * @GTK_ACCESSIBLE_ROLE_LINK: A clickable link.
  * @GTK_ACCESSIBLE_ROLE_LIST: A list of items.
  * @GTK_ACCESSIBLE_ROLE_LIST_BOX: Unused.
  * @GTK_ACCESSIBLE_ROLE_LIST_ITEM: An item in a list.
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 53a01cc207..e3baf93bc6 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -50,7 +50,7 @@
  *
  * # Accessibility
  *
- * GtkLinkButton uses the #GTK_ACCESSIBLE_ROLE_BUTTON role.
+ * GtkLinkButton uses the #GTK_ACCESSIBLE_ROLE_LINK role.
  */
 
 #include "config.h"
@@ -220,7 +220,7 @@ gtk_link_button_class_init (GtkLinkButtonClass *klass)
                   G_TYPE_BOOLEAN, 0);
 
   gtk_widget_class_set_css_name (widget_class, I_("button"));
-  gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_BUTTON);
+  gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_LINK);
 
   /**
    * GtkLinkButton|clipboard.copy:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]