Document accessible roles for stacks and notebooks

This was forgotten when I implemented the Tabs pattern.
This commit is contained in:
Matthias Clasen 2020-10-14 22:27:09 -04:00
parent 14640cec85
commit 1bf21d3dba
5 changed files with 22 additions and 3 deletions

View File

@ -63,6 +63,9 @@ Each role name is part of the #GtkAccessibleRole enumeration.
| `SEPARATOR` | A divider that separates sections of content or groups of items | #GtkSeparator | | `SEPARATOR` | A divider that separates sections of content or groups of items | #GtkSeparator |
| `SPIN_BUTTON` | A range control that allows seelcting among discrete choices | #GtkSpinButton | | `SPIN_BUTTON` | A range control that allows seelcting among discrete choices | #GtkSpinButton |
| `SWITCH` | A control that represents on/off values | #GtkSwitch | | `SWITCH` | A control that represents on/off values | #GtkSwitch |
| `TAB` | A tab in a list of tabs for switching pages | #GtkStackSwitcher, #GtkNotebook |
| `TAB_LIST` | A list of tabs for switching pages | #GtkStackSwitcher, #GtkNotebook |
| `TAB_PANEL` | A page in a notebook or stack | #GtkStack |
| `TEXT_BOX` | A type of input that allows free-form text as its value. | #GtkEntry, #GtkPasswordEntry, #GtkTextView | | `TEXT_BOX` | A type of input that allows free-form text as its value. | #GtkEntry, #GtkPasswordEntry, #GtkTextView |
| `WINDOW` | An application window | #GtkWindow | | `WINDOW` | An application window | #GtkWindow |
| `...` | … | | `...` | … |

View File

@ -1232,10 +1232,10 @@ typedef enum {
* @GTK_ACCESSIBLE_ROLE_STRUCTURE: Unused * @GTK_ACCESSIBLE_ROLE_STRUCTURE: Unused
* @GTK_ACCESSIBLE_ROLE_SWITCH: A type of checkbox that represents on/off values, * @GTK_ACCESSIBLE_ROLE_SWITCH: A type of checkbox that represents on/off values,
* as opposed to checked/unchecked 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_TABLE: Unused
* @GTK_ACCESSIBLE_ROLE_TAB_LIST: Unused * @GTK_ACCESSIBLE_ROLE_TAB_LIST: A list of tabs for switching pages.
* @GTK_ACCESSIBLE_ROLE_TAB_PANEL: Unused * @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 * @GTK_ACCESSIBLE_ROLE_TEXT_BOX: A type of input that allows free-form text
* as its value. * as its value.
* @GTK_ACCESSIBLE_ROLE_TIME: Unused * @GTK_ACCESSIBLE_ROLE_TIME: Unused

View File

@ -144,6 +144,12 @@
* A tab node gets the .dnd style class while it is moved with drag-and-drop. * 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. * 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.
*/ */

View File

@ -80,6 +80,11 @@
* # CSS nodes * # CSS nodes
* *
* GtkStack has a single CSS node named stack. * GtkStack has a single CSS node named stack.
*
* # Accessibility
*
* GtkStack uses the #GTK_ACCESSIBLE_ROLE_TAB_PANEL for the stack
* pages.
*/ */
/** /**

View File

@ -59,6 +59,11 @@
* When circumstances require it, GtkStackSwitcher adds the * When circumstances require it, GtkStackSwitcher adds the
* .needs-attention style class to the widgets representing the * .needs-attention style class to the widgets representing the
* stack pages. * 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 #define TIMEOUT_EXPAND 500