Skip to content

Commit

Permalink
tdf#157639 a11y: Set proper role for status bar
Browse files Browse the repository at this point in the history
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:
nvaccess/nvda#15592

Change-Id: Iac587be96ec941afd7625ee363949f5da0cbc873
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157659
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
  • Loading branch information
michaelweghorn committed Oct 6, 2023
1 parent dd0a0ec commit f8e16f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vcl/source/window/builder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down

0 comments on commit f8e16f2

Please sign in to comment.