summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-04-11 09:39:08 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-04-11 23:53:52 +0200
commit520722210d9ffcf57b08e4bd7dd8803c5190937c (patch)
treef410ce2020766b813139d35b95c7ddd007d4749d /vcl/source
parent0de33d779747d4117348daf92b08b105102968b3 (diff)
a11y: Assign a11y role for WindowType::PROGRESSBAR
`WindowType::PROGRESSBAR` was recently added in commit 460a7103664ac8dc60e260c56e5113d689b8072f Author: Hubert Figuière <hub@collabora.com> Date: Fri Mar 22 09:59:54 2024 -0400 vcl: Implement JSLevelBar This fixes the JSDialog layout of the sheet protection dialog. This was introduced for 24.02 to provide password strength indication of the sheet password. Defined a new WindowType of PROGRESSBAR. The type property in JSDialog JSON will be "progressbar". Map it to the corresponding a11y role, `accessibility::AccessibleRole::PROGRESS_BAR`, so it's reported as such on the a11y level. The role can e.g. be seen in Accerciser for the password strength indicator (progress bar) in the dialog to set a document password (shown when checking the "Save with password" checkbox in the Save dialog in Writer). Before: In [2]: acc.role Out[2]: <enum ATSPI_ROLE_PANEL of type Atspi.Role> With this commit in place: In [8]: acc.role Out[8]: <enum ATSPI_ROLE_PROGRESS_BAR of type Atspi.Role> Change-Id: Idfd7798641e30632a9ffd2ea07a79d42d159a51f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165989 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/accessibility.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index 47f46ee44ab7..e48d5d22dd5e 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -363,6 +363,10 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
nRole = accessibility::AccessibleRole::TOOL_TIP;
break;
+ case WindowType::PROGRESSBAR:
+ nRole = accessibility::AccessibleRole::PROGRESS_BAR;
+ break;
+
case WindowType::RULER:
nRole = accessibility::AccessibleRole::RULER;
break;