diff --git a/gtk/a11y/gtkatspiutils.c b/gtk/a11y/gtkatspiutils.c index 6bf2d44549..1d2a91a376 100644 --- a/gtk/a11y/gtkatspiutils.c +++ b/gtk/a11y/gtkatspiutils.c @@ -48,6 +48,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role) case GTK_ACCESSIBLE_ROLE_APPLICATION: return ATSPI_ROLE_FRAME; + case GTK_ACCESSIBLE_ROLE_ARTICLE: + return ATSPI_ROLE_ARTICLE; + case GTK_ACCESSIBLE_ROLE_BANNER: break; @@ -75,6 +78,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role) case GTK_ACCESSIBLE_ROLE_COMMAND: break; + case GTK_ACCESSIBLE_ROLE_COMMENT: + return ATSPI_ROLE_COMMENT; + case GTK_ACCESSIBLE_ROLE_COMPOSITE: break; diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c index 5242855ed5..b14a947aac 100644 --- a/gtk/gtkaccessible.c +++ b/gtk/gtkaccessible.c @@ -834,6 +834,8 @@ static const char *role_names[] = { [GTK_ACCESSIBLE_ROLE_APPLICATION] = NC_("accessibility", "application"), [GTK_ACCESSIBLE_ROLE_PARAGRAPH] = NC_("accessibility", "paragraph"), [GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NC_("accessibility", "block quote"), + [GTK_ACCESSIBLE_ROLE_ARTICLE] = NC_("accessibility", "article"), + [GTK_ACCESSIBLE_ROLE_COMMENT] = NC_("accessibility", "comment"), }; /*< private > @@ -950,6 +952,8 @@ static struct { { GTK_ACCESSIBLE_ROLE_ALERT, GTK_ACCESSIBLE_ROLE_ALERT_DIALOG }, { GTK_ACCESSIBLE_ROLE_STATUS, GTK_ACCESSIBLE_ROLE_TIMER }, { GTK_ACCESSIBLE_ROLE_DIALOG, GTK_ACCESSIBLE_ROLE_ALERT_DIALOG }, + { GTK_ACCESSIBLE_ROLE_DOCUMENT, GTK_ACCESSIBLE_ROLE_ARTICLE }, + { GTK_ACCESSIBLE_ROLE_ARTICLE, GTK_ACCESSIBLE_ROLE_COMMENT }, }; gboolean diff --git a/gtk/gtkatcontext.c b/gtk/gtkatcontext.c index 9d4188a1aa..3c87ca840c 100644 --- a/gtk/gtkatcontext.c +++ b/gtk/gtkatcontext.c @@ -1025,6 +1025,7 @@ gtk_at_context_get_accessible_relation (GtkATContext *self, static guint8 naming[] = { [GTK_ACCESSIBLE_ROLE_ALERT] = NAME_FROM_AUTHOR, [GTK_ACCESSIBLE_ROLE_ALERT_DIALOG] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED, + [GTK_ACCESSIBLE_ROLE_ARTICLE] = NAME_FROM_AUTHOR, [GTK_ACCESSIBLE_ROLE_BANNER] = GTK_ACCESSIBLE_NAME_PROHIBITED, [GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NAME_FROM_AUTHOR, [GTK_ACCESSIBLE_ROLE_BUTTON] = NAME_FROM_AUTHOR|NAME_FROM_CONTENT|GTK_ACCESSIBLE_NAME_REQUIRED, @@ -1034,6 +1035,7 @@ static guint8 naming[] = { [GTK_ACCESSIBLE_ROLE_COLUMN_HEADER] = NAME_FROM_AUTHOR|NAME_FROM_CONTENT|GTK_ACCESSIBLE_NAME_REQUIRED, [GTK_ACCESSIBLE_ROLE_COMBO_BOX] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED, [GTK_ACCESSIBLE_ROLE_COMMAND] = GTK_ACCESSIBLE_NAME_PROHIBITED, + [GTK_ACCESSIBLE_ROLE_COMMENT] = NAME_FROM_AUTHOR|NAME_FROM_CONTENT, [GTK_ACCESSIBLE_ROLE_COMPOSITE] = GTK_ACCESSIBLE_NAME_PROHIBITED, [GTK_ACCESSIBLE_ROLE_DIALOG] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED, [GTK_ACCESSIBLE_ROLE_DOCUMENT] = NAME_FROM_AUTHOR, diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index 07da78551f..aa166dd26a 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -1367,6 +1367,12 @@ typedef enum { * @GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE: A section of content that is quoted * from another source. * Since: 4.14 + * @GTK_ACCESSIBLE_ROLE_ARTICLE: A section of a page that consists of a + * composition that forms an independent part of a document, page, or site. + * Since: 4.14 + * @GTK_ACCESSIBLE_ROLE_COMMENT: A comment contains content expressing reaction + * to other content. + * Since: 4.14 * * The accessible role for a [iface@Accessible] implementation. * @@ -1455,7 +1461,9 @@ typedef enum { GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON GDK_AVAILABLE_ENUMERATOR_IN_4_10, GTK_ACCESSIBLE_ROLE_APPLICATION GDK_AVAILABLE_ENUMERATOR_IN_4_12, GTK_ACCESSIBLE_ROLE_PARAGRAPH GDK_AVAILABLE_ENUMERATOR_IN_4_14, - GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE GDK_AVAILABLE_ENUMERATOR_IN_4_14 + GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE GDK_AVAILABLE_ENUMERATOR_IN_4_14, + GTK_ACCESSIBLE_ROLE_ARTICLE GDK_AVAILABLE_ENUMERATOR_IN_4_14, + GTK_ACCESSIBLE_ROLE_COMMENT GDK_AVAILABLE_ENUMERATOR_IN_4_14 } GtkAccessibleRole; /**