mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Merge branch 'michaelweghorn/a11y_add_article_and_comment_roles' into 'main'
a11y: Add article and comment roles See merge request GNOME/gtk!6646
This commit is contained in:
commit
857de33937
@ -48,6 +48,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role)
|
|||||||
case GTK_ACCESSIBLE_ROLE_APPLICATION:
|
case GTK_ACCESSIBLE_ROLE_APPLICATION:
|
||||||
return ATSPI_ROLE_FRAME;
|
return ATSPI_ROLE_FRAME;
|
||||||
|
|
||||||
|
case GTK_ACCESSIBLE_ROLE_ARTICLE:
|
||||||
|
return ATSPI_ROLE_ARTICLE;
|
||||||
|
|
||||||
case GTK_ACCESSIBLE_ROLE_BANNER:
|
case GTK_ACCESSIBLE_ROLE_BANNER:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -75,6 +78,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role)
|
|||||||
case GTK_ACCESSIBLE_ROLE_COMMAND:
|
case GTK_ACCESSIBLE_ROLE_COMMAND:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GTK_ACCESSIBLE_ROLE_COMMENT:
|
||||||
|
return ATSPI_ROLE_COMMENT;
|
||||||
|
|
||||||
case GTK_ACCESSIBLE_ROLE_COMPOSITE:
|
case GTK_ACCESSIBLE_ROLE_COMPOSITE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -834,6 +834,8 @@ static const char *role_names[] = {
|
|||||||
[GTK_ACCESSIBLE_ROLE_APPLICATION] = NC_("accessibility", "application"),
|
[GTK_ACCESSIBLE_ROLE_APPLICATION] = NC_("accessibility", "application"),
|
||||||
[GTK_ACCESSIBLE_ROLE_PARAGRAPH] = NC_("accessibility", "paragraph"),
|
[GTK_ACCESSIBLE_ROLE_PARAGRAPH] = NC_("accessibility", "paragraph"),
|
||||||
[GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NC_("accessibility", "block quote"),
|
[GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NC_("accessibility", "block quote"),
|
||||||
|
[GTK_ACCESSIBLE_ROLE_ARTICLE] = NC_("accessibility", "article"),
|
||||||
|
[GTK_ACCESSIBLE_ROLE_COMMENT] = NC_("accessibility", "comment"),
|
||||||
};
|
};
|
||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
@ -950,6 +952,8 @@ static struct {
|
|||||||
{ GTK_ACCESSIBLE_ROLE_ALERT, GTK_ACCESSIBLE_ROLE_ALERT_DIALOG },
|
{ GTK_ACCESSIBLE_ROLE_ALERT, GTK_ACCESSIBLE_ROLE_ALERT_DIALOG },
|
||||||
{ GTK_ACCESSIBLE_ROLE_STATUS, GTK_ACCESSIBLE_ROLE_TIMER },
|
{ GTK_ACCESSIBLE_ROLE_STATUS, GTK_ACCESSIBLE_ROLE_TIMER },
|
||||||
{ GTK_ACCESSIBLE_ROLE_DIALOG, GTK_ACCESSIBLE_ROLE_ALERT_DIALOG },
|
{ 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
|
gboolean
|
||||||
|
@ -1025,6 +1025,7 @@ gtk_at_context_get_accessible_relation (GtkATContext *self,
|
|||||||
static guint8 naming[] = {
|
static guint8 naming[] = {
|
||||||
[GTK_ACCESSIBLE_ROLE_ALERT] = NAME_FROM_AUTHOR,
|
[GTK_ACCESSIBLE_ROLE_ALERT] = NAME_FROM_AUTHOR,
|
||||||
[GTK_ACCESSIBLE_ROLE_ALERT_DIALOG] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED,
|
[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_BANNER] = GTK_ACCESSIBLE_NAME_PROHIBITED,
|
||||||
[GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NAME_FROM_AUTHOR,
|
[GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NAME_FROM_AUTHOR,
|
||||||
[GTK_ACCESSIBLE_ROLE_BUTTON] = NAME_FROM_AUTHOR|NAME_FROM_CONTENT|GTK_ACCESSIBLE_NAME_REQUIRED,
|
[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_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_COMBO_BOX] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED,
|
||||||
[GTK_ACCESSIBLE_ROLE_COMMAND] = GTK_ACCESSIBLE_NAME_PROHIBITED,
|
[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_COMPOSITE] = GTK_ACCESSIBLE_NAME_PROHIBITED,
|
||||||
[GTK_ACCESSIBLE_ROLE_DIALOG] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED,
|
[GTK_ACCESSIBLE_ROLE_DIALOG] = NAME_FROM_AUTHOR|GTK_ACCESSIBLE_NAME_REQUIRED,
|
||||||
[GTK_ACCESSIBLE_ROLE_DOCUMENT] = NAME_FROM_AUTHOR,
|
[GTK_ACCESSIBLE_ROLE_DOCUMENT] = NAME_FROM_AUTHOR,
|
||||||
|
@ -1367,6 +1367,12 @@ typedef enum {
|
|||||||
* @GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE: A section of content that is quoted
|
* @GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE: A section of content that is quoted
|
||||||
* from another source.
|
* from another source.
|
||||||
* Since: 4.14
|
* 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.
|
* 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_TOGGLE_BUTTON GDK_AVAILABLE_ENUMERATOR_IN_4_10,
|
||||||
GTK_ACCESSIBLE_ROLE_APPLICATION GDK_AVAILABLE_ENUMERATOR_IN_4_12,
|
GTK_ACCESSIBLE_ROLE_APPLICATION GDK_AVAILABLE_ENUMERATOR_IN_4_12,
|
||||||
GTK_ACCESSIBLE_ROLE_PARAGRAPH GDK_AVAILABLE_ENUMERATOR_IN_4_14,
|
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;
|
} GtkAccessibleRole;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user