forked from AuroraMiddleware/gtk
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. Update tests to match.
This commit is contained in:
parent
bcbc6159f4
commit
800eb76a2d
@ -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 |
|
||||
|
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -49,7 +49,7 @@ linkbutton_role (void)
|
||||
GtkWidget *button = gtk_link_button_new ("Hello");
|
||||
g_object_ref_sink (button);
|
||||
|
||||
gtk_test_accessible_assert_role (button, GTK_ACCESSIBLE_ROLE_BUTTON);
|
||||
gtk_test_accessible_assert_role (button, GTK_ACCESSIBLE_ROLE_LINK);
|
||||
|
||||
g_object_unref (button);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user