summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-10-06 17:27:40 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2023-10-07 00:05:43 +0200
commitf8e16f26a037a71349dc1a197b5ace204acb123b (patch)
tree58921777ed6605a51f752fdc7748e90a72241d92 /vcl
parentdd0a0ecb839df1289693d4b2f862e3942a80345d (diff)
tdf#157639 a11y: Set proper role for status bar
Set `css::accessibility::AccessibleRole::STATUS_BAR` as role for the `VclHBox`/`VclVBox` instances created for `GtkStatusBar` nodes in .ui files, so that they are properly exposed to the accessibility layer. This is e.g. required to make NVDA's feature to announce the status bar content (when pressing NVDA+End) work. An additional change on NVDA side is needed to make the announcement work. Pending PR: https://github.com/nvaccess/nvda/pull/15592 Change-Id: Iac587be96ec941afd7625ee363949f5da0cbc873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157659 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/builder.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6974cdce9ccd..3825c9674fb1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1679,6 +1679,9 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString
xWindow = VclPtr<VclVBox>::Create(pParent);
else
xWindow = VclPtr<VclHBox>::Create(pParent);
+
+ if (name == "GtkStatusbar")
+ xWindow->SetAccessibleRole(css::accessibility::AccessibleRole::STATUS_BAR);
}
else if (name == "GtkPaned")
{