math a11y: Set a11y names for items in Elements sidebar deck
Similar to how Change-Id: I59275d8020d0ebd46256bdc1531849cf5be5a353 Author: Michael Weghorn <m.weghorn@posteo.de> 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 <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
parent
6c22b1abff
commit
db146f9856
@ -595,6 +595,7 @@ void SmElementsControl::addElement(const OUString& aElementVisual, const OUStrin
|
|||||||
maItemDatas.push_back(std::make_unique<ElementData>(aElementSource, aHelpText, maItemDatas.size()));
|
maItemDatas.push_back(std::make_unique<ElementData>(aElementSource, aHelpText, maItemDatas.size()));
|
||||||
const OUString aId(weld::toId(maItemDatas.back().get()));
|
const OUString aId(weld::toId(maItemDatas.back().get()));
|
||||||
mpIconView->insert(-1, nullptr, &aId, pDevice, nullptr);
|
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())
|
if (mpIconView->get_item_width() < aSize.Width())
|
||||||
mpIconView->set_item_width(aSize.Width());
|
mpIconView->set_item_width(aSize.Width());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user