summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-16 17:42:16 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-17 00:24:36 +0100
commit8383c3b1126d5e22b343bb9ef7b43cf6a19c56f2 (patch)
tree6d312aed5ab4032c6d09e2f2decda8efb55816fe /vcl
parent53f91fb880a5360ace7d0de5fce785088c8d19d6 (diff)
gtk4 a11y: Map BLOCK_QUOTE role to new gtk equivalent
Map the role to the `GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE` equivalent newly added to Gtk 4 in commit [1]: commit bbb0150383e6aabdbead635f1751322530392b3a Author: Michael Weghorn <m.weghorn@posteo.de> a11y: Add block quote role With this and the gtk commit in place, Accerciser shows the block quote role for Writer paragraphs using the "Block Quotation" paragraph style as expected. Also needs a bump of the gtk version to >= 4.13.4 on the gtk "main" branch after the 4.13.3 release for the `GTK_CHECK_VERSION` check to pass and actually make use of the new role, see MR [2]. Omit the fallback to `GTK_ACCESSIBLE_ROLE_PARAGRAPH` for Gtk versions >= 4.13.1 but < 4.13.4, since they are all development versions for the same stable release 4.14. [1] https://gitlab.gnome.org/GNOME/gtk/-/commit/bbb0150383e6aabdbead635f1751322530392b3a [2] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6574 Change-Id: I2c17da13867a61f0e6819913583392962cfd44a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158685 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk4/a11y.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx
index c4cd20d66aa2..c8103471b085 100644
--- a/vcl/unx/gtk4/a11y.cxx
+++ b/vcl/unx/gtk4/a11y.cxx
@@ -54,6 +54,13 @@ map_accessible_role(const css::uno::Reference<css::accessibility::XAccessible>&
case css::accessibility::AccessibleRole::NOTIFICATION:
eRole = GTK_ACCESSIBLE_ROLE_ALERT;
break;
+ case css::accessibility::AccessibleRole::BLOCK_QUOTE:
+#if GTK_CHECK_VERSION(4, 13, 4)
+ eRole = GTK_ACCESSIBLE_ROLE_BLOCK_QUOTE;
+#else
+ eRole = GTK_ACCESSIBLE_ROLE_GROUP;
+#endif
+ break;
case css::accessibility::AccessibleRole::CAPTION:
eRole = GTK_ACCESSIBLE_ROLE_CAPTION;
break;
@@ -140,7 +147,6 @@ map_accessible_role(const css::uno::Reference<css::accessibility::XAccessible>&
eRole = GTK_ACCESSIBLE_ROLE_WIDGET;
break;
case css::accessibility::AccessibleRole::PARAGRAPH:
- case css::accessibility::AccessibleRole::BLOCK_QUOTE:
#if GTK_CHECK_VERSION(4, 13, 1)
eRole = GTK_ACCESSIBLE_ROLE_PARAGRAPH;
#else