From ceca4cde363154b0c7e276d65fc87ec94eb0bb9a Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 28 May 2024 15:07:30 +0200 Subject: [PATCH] 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 --- accessibility/source/extended/accessibleiconchoicectrl.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index 33b15d5f54c8..877816466a19 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -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