Up until now, toggle buttons were presented as regular push buttons.
That's the approach used by the ARIA specification, however, our platform
accessibility backend, at-spi2, can not represent accessibe states with values,
so we can not represent the design pattern precisely enough for screen readers.
If, in future, the a11y backends gain this capability, we might consider again
removing this role.
case GTK_ACCESSIBLE_ROLE_WINDOW:
return ATSPI_ROLE_FRAME;
+ case GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON:
+ return ATSPI_ROLE_TOGGLE_BUTTON;
default:
break;
}
* @GTK_ACCESSIBLE_ROLE_WIDGET: An interactive component of a graphical user
* interface. This is the role that GTK uses by default for widgets.
* @GTK_ACCESSIBLE_ROLE_WINDOW: An application window.
+ * @GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON: A type of push button
+ * which stays pressed until depressed by a second activation.
+ * Since: 4.10
*
* The accessible role for a [iface@Accessible] implementation.
*
GTK_ACCESSIBLE_ROLE_TREE_GRID,
GTK_ACCESSIBLE_ROLE_TREE_ITEM,
GTK_ACCESSIBLE_ROLE_WIDGET,
- GTK_ACCESSIBLE_ROLE_WINDOW
+ GTK_ACCESSIBLE_ROLE_WINDOW,
+ GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
} GtkAccessibleRole;
/**