summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-06 10:47:23 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-07 07:57:34 +0100
commite510da3b0379c63e6ecfefeb7358251591226701 (patch)
treed441c0b6ee045c0698088ecb616bcaae6882f9a8 /vcl
parentdff76b069e26a6d3487f74c5784d6f6cf273a19e (diff)
gtk4 a11y: Map PASSWORD_TEXT role to gtk text box role
This is in line with what the `GtkPasswordEntry` doc [1] says: > `GtkPasswordEntry` uses the `GTK_ACCESSIBLE_ROLE_TEXT_BOX` role. Note however, that gtk's AT-SPI bridge has specific code to map that to AT-SPI's `ATSPI_ROLE_PASSWORD_TEXT` for `GtkPasswordEntry` [2], which won't apply for any custom LO widgets. Currently, LO uses `GtkEntry` for password entries for gtk4 as well, e.g. the one in the "Tools" -> "Options" -> "Security" -> "Password for Web Connections" -> "Master Password" dialog, so those currently have an AT-SPI role of `ATSPI_ROLE_TEXT` for gtk4, while it is `ATSPI_ROLE_PASSWORD_TEXT` for gtk3. (That's independent of this change, since a native `GtkEntry` is used there. Changing this to use `GtkPasswordEntry` instead of `GtkEntry` for the gtk4 case should cause that to use `ATSPI_ROLE_PASSWORD_TEXT` as well.) [1] https://docs.gtk.org/gtk4/class.PasswordEntry.html#accessibility [2] https://gitlab.gnome.org/GNOME/gtk/-/blob/fe4b7a5159e8cc3e4918ad1829d71ff39edd5ba7/gtk/a11y/gtkatspiutils.c#L308-310 Change-Id: Iec6c8685f017b565553fbc63b4403484be20ed1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158984 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk4/a11y.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx
index fcd9cb6fb949..2aae5bdefae6 100644
--- a/vcl/unx/gtk4/a11y.cxx
+++ b/vcl/unx/gtk4/a11y.cxx
@@ -184,6 +184,7 @@ map_accessible_role(const css::uno::Reference<css::accessibility::XAccessible>&
eRole = GTK_ACCESSIBLE_ROLE_SPIN_BUTTON;
break;
case css::accessibility::AccessibleRole::TEXT:
+ case css::accessibility::AccessibleRole::PASSWORD_TEXT:
eRole = GTK_ACCESSIBLE_ROLE_TEXT_BOX;
break;
case css::accessibility::AccessibleRole::TOOL_TIP: