vcl/source/window/layout.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit 5f5e1a3204b98b9e74bded50ba0eddd4fb371301 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Mar 21 13:08:17 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Mar 21 14:57:46 2023 +0000 gtk4: use PANEL a11y role for VclBox under gtk4 Change-Id: I0cd6bb9578c177947741bb6d8d21237faf41679d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149214 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8c102bd6004c..6befd3399520 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -401,12 +401,17 @@ void VclBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) sal_uInt16 VclBox::getDefaultAccessibleRole() const { + // fdo#74284 call Boxes Panels, keep them as "Filler" under + // at least Linux seeing as that's what Gtk3 did for GtkBoxes. + // Though now with Gtk4 that uses GTK_ACCESSIBLE_ROLE_GROUP + // which maps to ATSPI_ROLE_PANEL #if defined(_WIN32) - //fdo#74284 call Boxes Panels, keep them as "Filler" under - //at least Linux seeing as that's what Gtk does for GtkBoxes return css::accessibility::AccessibleRole::PANEL; #else - return css::accessibility::AccessibleRole::FILLER; + static sal_uInt16 eRole = Application::GetToolkitName() == "gtk4" ? + css::accessibility::AccessibleRole::PANEL : + css::accessibility::AccessibleRole::FILLER; + return eRole; #endif }