summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3/a11y/atkwrapper.hxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-13 11:45:06 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-12-20 17:10:08 +0100
commite8d18c73dbbf8cfcd972072510985d6bd18b2cca (patch)
tree0c3d17449a6719d48a951c223892b85718d7cc89 /vcl/unx/gtk3/a11y/atkwrapper.hxx
parentb88198c183dfb10c97409e83ea5ad7793811e7fb (diff)
tdf#123864 gtk3 a11y: Consider states when mapping BUTTON_DROPDOWN
Take the checkable state into account when mapping the `AccessibleRole::BUTTON_DROPDOWN` role. There is no direct ATK equivalent for `AccessibleRole::BUTTON_DROPDOWN`. Don't always use ATK_ROLE_PUSH_BUTTON, but use ATK_ROLE_TOGGLE_BUTTON when the button is CHECKABLE, i.e. it can be toggled. With this in place, Orca now announces the state of the underline button (on/off) when using the gtk3 VCL plugin. Related Orca source code that requires the toggle button role: [1] The state is not announced when using the qt6 VCL plugin yet, and Qt currently doesn't have a toggle button role, so that would have to be added there first to do something similar there. For gtk4, mapping could probably be done similarly, but more is missing for Orca to announce things in custom widgets (e.g. event handling), so leave that for later. [1] https://gitlab.gnome.org/GNOME/orca/-/blob/b80bb951a651f5f12a5ddfb2a5b1c151568d045b/src/orca/scripts/apps/soffice/speech_generator.py#L177 Change-Id: If69e08d2e4939cc709d44e89cc2fd1d01691a70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160904 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161039
Diffstat (limited to 'vcl/unx/gtk3/a11y/atkwrapper.hxx')
-rw-r--r--vcl/unx/gtk3/a11y/atkwrapper.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/a11y/atkwrapper.hxx b/vcl/unx/gtk3/a11y/atkwrapper.hxx
index 911433fc8a6f..8d1aeb359bca 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.hxx
@@ -93,7 +93,7 @@ AtkObject * atk_object_wrapper_new(
void atk_object_wrapper_add_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index);
void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index);
-void atk_object_wrapper_set_role(AtkObjectWrapper* wrapper, sal_Int16 role);
+void atk_object_wrapper_set_role(AtkObjectWrapper* wrapper, sal_Int16 role, sal_Int64 nStates);
void atk_object_wrapper_dispose(AtkObjectWrapper* wrapper);