vcl/unx/gtk4/a11y.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit e510da3b0379c63e6ecfefeb7358251591226701
Author: Michael Weghorn <[email protected]>
AuthorDate: Mon Nov 6 10:47:23 2023 +0100
Commit: Michael Weghorn <[email protected]>
CommitDate: Tue Nov 7 07:57:34 2023 +0100
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 <[email protected]>
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: