vcl/qt5/QtBuilder.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
New commits: commit 8e21f46f9524986d67cc4aaccf4188d3f1887570 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Oct 4 11:14:24 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Oct 5 09:38:31 2024 +0200 tdf#130857 qt a11y weld: Apply ATK/a11y properties Set accessible name and description on the QWidget as specified in the .ui file. This e.g. makes Orca announce the a11y description of the checkboxes in the "Insert" -> "Axes" dialog newly supported by QtInstanceBuilder since Change-Id: I15901f83192ba33ddc5c5eb779be680f26cb6b55 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Fri Oct 4 10:53:28 2024 +0200 tdf#130857 qt weld: Declare support for chart "Insert Axes" dialog Change-Id: I403139577e6a932bb92da851dabd3cb994453083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174468 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 9c74d3f4fe96..c342e33d253b 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -244,9 +244,20 @@ void QtBuilder::setContext(QObject*, std::vector<vcl::EnumContext::Context>&&) SAL_WARN("vcl.qt", "Ignoring context"); } -void QtBuilder::applyAtkProperties(QObject*, const stringmap&, bool) +void QtBuilder::applyAtkProperties(QObject* pObject, const stringmap& rProperties, bool) { - SAL_WARN("vcl.qt", "QtBuilder::applyAtkProperties not implemented yet"); + if (!pObject || !pObject->isWidgetType()) + return; + + QWidget* pWidget = static_cast<QWidget*>(pObject); + + for (auto const & [ rKey, rValue ] : rProperties) + { + if (rKey == "AtkObject::accessible-description") + pWidget->setAccessibleDescription(toQString(rValue)); + else if (rKey == "AtkObject::accessible-name") + pWidget->setAccessibleName(toQString(rValue)); + } } void QtBuilder::applyPackingProperties(QObject*, QObject*, const stringmap&)