vcl/source/window/builder.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit f8e16f26a037a71349dc1a197b5ace204acb123b
Author: Michael Weghorn <[email protected]>
AuthorDate: Fri Oct 6 17:27:40 2023 +0200
Commit: Michael Weghorn <[email protected]>
CommitDate: Sat Oct 7 00:05:43 2023 +0200
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 <[email protected]>
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")
{