From db146f9856f41dba94477888853918a764a02e7a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 13 Feb 2025 15:18:10 +0100 Subject: [PATCH] math a11y: Set a11y names for items in Elements sidebar deck Similar to how Change-Id: I59275d8020d0ebd46256bdc1531849cf5be5a353 Author: Michael Weghorn Date: Thu Feb 13 13:48:35 2025 +0100 svx a11y: Set accessible name for Fontwork Gallery items did for the Fontwork Gallery, set a11y names for the items in Maths "Elements" sidebar deck (e.g. the mathematical operators,...). Use the text also used for the help text/tooltip (e.g. "+ Sign"), s. `QueryTooltipHandler`. Change-Id: I74d1aa41896b70f6025fdc7e4784a2b6539ec6f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181635 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- starmath/source/ElementsDockingWindow.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index f202d1bd74e0..f96d4647c0b9 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -595,6 +595,7 @@ void SmElementsControl::addElement(const OUString& aElementVisual, const OUStrin maItemDatas.push_back(std::make_unique(aElementSource, aHelpText, maItemDatas.size())); const OUString aId(weld::toId(maItemDatas.back().get())); mpIconView->insert(-1, nullptr, &aId, pDevice, nullptr); + mpIconView->set_item_accessible_name(mpIconView->n_children() - 1, GetElementHelpText(aId)); if (mpIconView->get_item_width() < aSize.Width()) mpIconView->set_item_width(aSize.Width()); }