summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-09-01 16:23:54 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2021-09-01 23:57:39 +0200
commit8887979092c88139e4b950d1a75fc576853a2e2c (patch)
tree8806beeb84c255adb89e4d72ca473dde7b067ba2
parent71b003a12f8afdff42a25786ad0a12ddd6609d59 (diff)
tdf#135588 a11y: Consider text as a11y name
If no accessible name could be retrieved from a corresponding label or using the quick help text, take the actual text of the window into account for MULTILINEEDIT, etc. This e.g. uses the texts in message dialogs for the two VCLMultiLineEdits holding the primary and secondary message in a MessageDialog (s. vcl/inc/messagedialog.hxx). With this in place, Accerciser now shows the actual messages of the message dialog when using the qt5/kf5 VCL plugins instead of just empty strings, just as is the case for the native gtk3 variant or similar dialogs in other applications. With this on top of a WIP branch that makes Orca (more or less) speak for the qt5/kf5 VCL plugin, the whole text of the message dialog is now spoken as well. (Previously, only the title of the dialog was announced). More is needed for the case of using the NVDA screen reader on Windows (which is the original scope of tdf#135588). That will be handled separately. Change-Id: I182f3c96ce646a198b747ca8fb5c1cc1ff0d7f7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121475 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--vcl/source/window/accessibility.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index a4e4bde261bd..732415572dee 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -410,6 +410,8 @@ OUString Window::getDefaultAccessibleName() const
aAccessibleName = pLabel->GetText();
if (aAccessibleName.isEmpty())
aAccessibleName = GetQuickHelpText();
+ if (aAccessibleName.isEmpty())
+ aAccessibleName = GetText();
}
break;