Merge branch 'ebassi/issue-6462' into 'main'

a11y: Add "terminal" role

Closes #6462

See merge request GNOME/gtk!6932
This commit is contained in:
Matthias Clasen 2024-02-22 15:33:33 +00:00
commit 2a0286c19c
3 changed files with 14 additions and 1 deletions

View File

@ -291,6 +291,9 @@ gtk_accessible_role_to_atspi_role (GtkAccessibleRole role)
case GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON:
return ATSPI_ROLE_TOGGLE_BUTTON;
case GTK_ACCESSIBLE_ROLE_TERMINAL:
return ATSPI_ROLE_TERMINAL;
default:
break;
}

View File

@ -871,6 +871,7 @@ static const char *role_names[] = {
[GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE] = NC_("accessibility", "block quote"),
[GTK_ACCESSIBLE_ROLE_ARTICLE] = NC_("accessibility", "article"),
[GTK_ACCESSIBLE_ROLE_COMMENT] = NC_("accessibility", "comment"),
[GTK_ACCESSIBLE_ROLE_TERMINAL] = NC_("accessibility", "terminal"),
};
/*< private >
@ -989,6 +990,7 @@ static struct {
{ 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 },
{ GTK_ACCESSIBLE_ROLE_TERMINAL, GTK_ACCESSIBLE_ROLE_WIDGET },
};
gboolean

View File

@ -1432,6 +1432,13 @@ typedef enum {
* Since: 4.14
*/
/**
* GTK_ACCESSIBLE_ROLE_TERMINAL:
*
* A virtual terminal.
*
* Since: 4.14
*/
typedef enum {
GTK_ACCESSIBLE_ROLE_ALERT,
GTK_ACCESSIBLE_ROLE_ALERT_DIALOG,
@ -1516,7 +1523,8 @@ typedef enum {
GTK_ACCESSIBLE_ROLE_PARAGRAPH 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
GTK_ACCESSIBLE_ROLE_COMMENT GDK_AVAILABLE_ENUMERATOR_IN_4_14,
GTK_ACCESSIBLE_ROLE_TERMINAL GDK_AVAILABLE_ENUMERATOR_IN_4_14
} GtkAccessibleRole;
/**