a11y: Don't report dummy a11y name for icon choice control

If no a11y name is set for the `SvtIconChoiceCtrl`, don't
report any, rather than using "IconChoiceControl" as
accessible name.

Having the Orca screen reader (when used with the qt6 VCL plugin)
announce "IconChoiceControl" and then the name of the actually
selected item e.g. in Writer's "Insert" -> "Hyperlink" or the
"Format" -> "Page Setup" dialog is rather confusing when an
entry in the control gets focus.

Change-Id: Ie7e25d5a65c57be118abf2dcaff0648430f26154
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168155
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2024-05-28 15:07:30 +02:00
parent c61f6a7802
commit ceca4cde36

View file

@ -194,10 +194,7 @@ namespace accessibility
{
::comphelper::OExternalLockGuard aGuard( this );
OUString sName = getCtrl()->GetAccessibleName();
if ( sName.isEmpty() )
sName = "IconChoiceControl";
return sName;
return getCtrl()->GetAccessibleName();
}
// XAccessibleSelection