[gtk/ebassi/new-a11y: 64/71] a11y: Change default accessible role
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/new-a11y: 64/71] a11y: Change default accessible role
- Date: Wed, 22 Jul 2020 12:27:09 +0000 (UTC)
commit 7fb4f87bd0a0bfe58de2d856209fdb09fc072dec
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 17 17:43:01 2020 +0100
a11y: Change default accessible role
Only GtkWidget should use GTK_ACCESSIBLE_ROLE_WIDGET as its default
accessible role; the default for GtkAccessible and GtkATContext should
be GTK_ACCESSIBLE_ROLE_NONE, meaning "an element whose implicit native
role semantics will not be mapped to the accessibility API", according
to the WAI-ARIA specification.
gtk/gtkaccessible.c | 6 +++---
gtk/gtkatcontext.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c
index 4f90d04e24..2638abcd1c 100644
--- a/gtk/gtkaccessible.c
+++ b/gtk/gtkaccessible.c
@@ -60,7 +60,7 @@ gtk_accessible_default_init (GtkAccessibleInterface *iface)
"Accessible Role",
"The role of the accessible object",
GTK_TYPE_ACCESSIBLE_ROLE,
- GTK_ACCESSIBLE_ROLE_WIDGET,
+ GTK_ACCESSIBLE_ROLE_NONE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
@@ -95,11 +95,11 @@ gtk_accessible_get_at_context (GtkAccessible *self)
GtkAccessibleRole
gtk_accessible_get_accessible_role (GtkAccessible *self)
{
- g_return_val_if_fail (GTK_IS_ACCESSIBLE (self), GTK_ACCESSIBLE_ROLE_WIDGET);
+ g_return_val_if_fail (GTK_IS_ACCESSIBLE (self), GTK_ACCESSIBLE_ROLE_NONE);
GtkATContext *context = gtk_accessible_get_at_context (self);
if (context == NULL)
- return GTK_ACCESSIBLE_ROLE_WIDGET;
+ return GTK_ACCESSIBLE_ROLE_NONE;
return gtk_at_context_get_accessible_role (context);
}
diff --git a/gtk/gtkatcontext.c b/gtk/gtkatcontext.c
index 2fa6be8506..9affb1f134 100644
--- a/gtk/gtkatcontext.c
+++ b/gtk/gtkatcontext.c
@@ -144,7 +144,7 @@ gtk_at_context_class_init (GtkATContextClass *klass)
"Accessible Role",
"The accessible role of the AT context",
GTK_TYPE_ACCESSIBLE_ROLE,
- GTK_ACCESSIBLE_ROLE_WIDGET,
+ GTK_ACCESSIBLE_ROLE_NONE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
@@ -281,7 +281,7 @@ gtk_accessible_state_get_attribute_name (GtkAccessibleState state)
static void
gtk_at_context_init (GtkATContext *self)
{
- self->accessible_role = GTK_ACCESSIBLE_ROLE_WIDGET;
+ self->accessible_role = GTK_ACCESSIBLE_ROLE_NONE;
self->properties =
gtk_accessible_attribute_set_new (N_PROPERTIES,
@@ -324,7 +324,7 @@ gtk_at_context_get_accessible (GtkATContext *self)
GtkAccessibleRole
gtk_at_context_get_accessible_role (GtkATContext *self)
{
- g_return_val_if_fail (GTK_IS_AT_CONTEXT (self), GTK_ACCESSIBLE_ROLE_WIDGET);
+ g_return_val_if_fail (GTK_IS_AT_CONTEXT (self), GTK_ACCESSIBLE_ROLE_NONE);
return self->accessible_role;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]