diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-10-14 22:27:09 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-14 22:27:09 -0400 |
commit | 1bf21d3dba1f6c95d3562ab9a2fb98235122c4ba (patch) | |
tree | c452744f3dc156a345a0fd2edeec93720c63f2e7 /gtk | |
parent | 14640cec85c5cf4f964830456dbe6655c39f80fd (diff) | |
download | gtk+-1bf21d3dba1f6c95d3562ab9a2fb98235122c4ba.tar.gz |
Document accessible roles for stacks and notebooks
This was forgotten when I implemented the Tabs pattern.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkenums.h | 6 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 6 | ||||
-rw-r--r-- | gtk/gtkstack.c | 5 | ||||
-rw-r--r-- | gtk/gtkstackswitcher.c | 5 |
4 files changed, 19 insertions, 3 deletions
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index 4aa4b8b4e6..d4495da91d 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -1232,10 +1232,10 @@ typedef enum { * @GTK_ACCESSIBLE_ROLE_STRUCTURE: Unused * @GTK_ACCESSIBLE_ROLE_SWITCH: A type of checkbox that represents on/off values, * as opposed to checked/unchecked values. - * @GTK_ACCESSIBLE_ROLE_TAB: Unused + * @GTK_ACCESSIBLE_ROLE_TAB: An item in a list of tab used for switching pages. * @GTK_ACCESSIBLE_ROLE_TABLE: Unused - * @GTK_ACCESSIBLE_ROLE_TAB_LIST: Unused - * @GTK_ACCESSIBLE_ROLE_TAB_PANEL: Unused + * @GTK_ACCESSIBLE_ROLE_TAB_LIST: A list of tabs for switching pages. + * @GTK_ACCESSIBLE_ROLE_TAB_PANEL: A page in a notebook or stack. * @GTK_ACCESSIBLE_ROLE_TEXT_BOX: A type of input that allows free-form text * as its value. * @GTK_ACCESSIBLE_ROLE_TIME: Unused diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 116e7d54d9..81346060c1 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -144,6 +144,12 @@ * A tab node gets the .dnd style class while it is moved with drag-and-drop. * * The nodes are always arranged from left-to-right, regardless of text direction. + * + * # Accessibility + * + * GtkNotebook uses the #GTK_ACCESSIBLE_ROLE_TAB_LIST and + * #GTK_ACCESSIBLE_ROLE_TAB roles for its list of tabs and the + * #GTK_ACCESSIBLE_ROLE_TAB_PANEL for the pages. */ diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 2c9b53bd07..a9a0902c23 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -80,6 +80,11 @@ * # CSS nodes * * GtkStack has a single CSS node named stack. + * + * # Accessibility + * + * GtkStack uses the #GTK_ACCESSIBLE_ROLE_TAB_PANEL for the stack + * pages. */ /** diff --git a/gtk/gtkstackswitcher.c b/gtk/gtkstackswitcher.c index 4392cc9cdb..fe6976b762 100644 --- a/gtk/gtkstackswitcher.c +++ b/gtk/gtkstackswitcher.c @@ -59,6 +59,11 @@ * When circumstances require it, GtkStackSwitcher adds the * .needs-attention style class to the widgets representing the * stack pages. + * + * # Accessibility + * + * GtkStackSwitcher uses the #GTK_ACCESSIBLE_ROLE_TAB_LIST role + * and uses the #GTK_ACCESSIBLE_ROLE_TAB for its buttons. */ #define TIMEOUT_EXPAND 500 |