diff options
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r-- | vcl/source/window/window.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index b57aee6cccf1..11386eaa74c9 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3346,6 +3346,7 @@ std::string_view windowTypeName(WindowType nWindowType) case WindowType::HEADERBAR: return "headerbar"; case WindowType::VERTICALTABCONTROL: return "verticaltabcontrol"; case WindowType::PROGRESSBAR: return "progressbar"; + case WindowType::LINK_BUTTON: return "linkbutton"; // nothing to do here, but for completeness case WindowType::TOOLKIT_FRAMEWINDOW: return "toolkit_framewindow"; @@ -3403,13 +3404,17 @@ void Window::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) if(!pAccLabelFor && !pAccLabelledBy) { - auto aAria = rJsonWriter.startNode("aria"); + OUString sAccName = GetAccessibleName(); + OUString sAccDesc = GetAccessibleDescription(); - OUString sAccString = GetAccessibleName(); - rJsonWriter.put("label", sAccString); - - sAccString = GetAccessibleDescription(); - rJsonWriter.put("description", sAccString); + if (!sAccName.isEmpty() || !sAccDesc.isEmpty()) + { + auto aAria = rJsonWriter.startNode("aria"); + if (!sAccName.isEmpty()) + rJsonWriter.put("label", sAccName); + if (!sAccDesc.isEmpty()) + rJsonWriter.put("description", sAccDesc); + } } mpWindowImpl->maDumpAsPropertyTreeHdl.Call(rJsonWriter); |