349a8801b9
This adds a new accessibility class 'SVTXAccessibleNumericField' that implements 'XAccessibleValue' and reports having an a11y role of 'AccessibleRole::SPIN_BOX'. An object of that class is returned by 'SVTXNumericField::CreateAccessibleContext'. Create an 'SVTXNumericField' XWindow peer for windows of type 'WindowType::FORMATTEDFIELD' (instead of a 'VCLXNumericField' one), so the newly introduced accessibility class gets used for 'FormattedField'. This way, FormattedFields are now exposed to a11y tools as spinboxes. Previously, since no specific accessibility class had been implemented for VCLXNumericField (then used as XWindow peer class for FormattedField), the one for VCLXEdit, i.e. VCLXAccessibleEdit, was used. While VCLXNumericField implements XNumericField and thus in general offers the relevant methods to implement an accessible class that implements XAccessibleValue as well, it uses the Formatter from the VCLXFormattedSpinField base class to get/set values. However, that doesn't work for the FormattedField case, since FormattedField has its own formatter of a different type and the 'mpFormatter' member in the VCLXFormattedSpinField base class is a nullptr, resulting in the corresponding getter methods always returning 0 and the setters doing nothing. With this commit in place, Accerciser now reports role "spin box" instead of just "text" for FormattedFields and displays the current value as well as allows to change it via the "Value" interface when using the qt5/kf5 VCL plugin. Note: For non-integer values, Accerciser doesn't show the actual decimal value, but an integer, e.g. when the value for "Height" spinbox in Writer's "Page Style" -> "Page" dialog (section "Paper format") is set to "29.70cm", Accerciser shows "30" instead of "29.70", despite 'Qt5AccessibleWidget::currentValue' returning the exact value. This is because Accerciser appears to rely on the value for the minimum increment being reported (as a corresponding decimal value) by a call to 'atspi_value_get_minimum_increment', s.[1]. However, there is currently no corresponding method in the 'XAccesibleValue' interface for that at-spi method which 'Qt5AccessibleWidget::currentValue' could call to retrieve the value. The NVDA screen reader on Windows now also says e.g. "Width: (Type = 344) spin button editable Alt+W selected 8.50″" instead of "Width: (Type = 344) edit Alt+W selected 8.50″". [1] https://developer.gnome.org/libatspi/stable/libatspi-atspi-value.html#atspi-value-get-minimum-increment Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119590 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
114 lines
5 KiB
Makefile
114 lines
5 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
|
|
$(eval $(call gb_Library_Library,acc))
|
|
|
|
$(eval $(call gb_Library_set_include,acc,\
|
|
$$(INCLUDE) \
|
|
-I$(SRCDIR)/accessibility/inc \
|
|
-I$(SRCDIR)/accessibility/source/inc \
|
|
))
|
|
|
|
$(eval $(call gb_Library_set_precompiled_header,acc,accessibility/inc/pch/precompiled_acc))
|
|
|
|
$(eval $(call gb_Library_use_external,acc,boost_headers))
|
|
|
|
$(eval $(call gb_Library_use_sdk_api,acc))
|
|
|
|
$(eval $(call gb_Library_use_libraries,acc,\
|
|
comphelper \
|
|
cppu \
|
|
cppuhelper \
|
|
sal \
|
|
salhelper \
|
|
i18nlangtag \
|
|
sot \
|
|
svl \
|
|
svt \
|
|
tk \
|
|
tl \
|
|
utl \
|
|
vcl \
|
|
))
|
|
|
|
$(eval $(call gb_Library_add_defs,acc,\
|
|
-DVCL_INTERNALS \
|
|
))
|
|
|
|
$(eval $(call gb_Library_add_exception_objects,acc,\
|
|
accessibility/source/extended/AccessibleBrowseBox \
|
|
accessibility/source/extended/AccessibleBrowseBoxBase \
|
|
accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell \
|
|
accessibility/source/extended/AccessibleBrowseBoxHeaderBar \
|
|
accessibility/source/extended/AccessibleBrowseBoxHeaderCell \
|
|
accessibility/source/extended/AccessibleBrowseBoxTable \
|
|
accessibility/source/extended/AccessibleBrowseBoxTableBase \
|
|
accessibility/source/extended/AccessibleBrowseBoxTableCell \
|
|
accessibility/source/extended/AccessibleGridControl \
|
|
accessibility/source/extended/AccessibleGridControlBase \
|
|
accessibility/source/extended/AccessibleGridControlHeader \
|
|
accessibility/source/extended/AccessibleGridControlHeaderCell \
|
|
accessibility/source/extended/AccessibleGridControlTable \
|
|
accessibility/source/extended/AccessibleGridControlTableBase \
|
|
accessibility/source/extended/AccessibleGridControlTableCell \
|
|
accessibility/source/extended/accessiblebrowseboxcell \
|
|
accessibility/source/extended/accessibleeditbrowseboxcell \
|
|
accessibility/source/extended/accessibleiconchoicectrl \
|
|
accessibility/source/extended/accessibleiconchoicectrlentry \
|
|
accessibility/source/extended/accessiblelistbox \
|
|
accessibility/source/extended/accessiblelistboxentry \
|
|
accessibility/source/extended/accessibletabbar \
|
|
accessibility/source/extended/accessibletabbarbase \
|
|
accessibility/source/extended/accessibletabbarpage \
|
|
accessibility/source/extended/accessibletabbarpagelist \
|
|
accessibility/source/extended/accessibletablistbox \
|
|
accessibility/source/extended/accessibletablistboxtable \
|
|
accessibility/source/extended/textwindowaccessibility \
|
|
accessibility/source/helper/acc_factory \
|
|
accessibility/source/helper/accresmgr \
|
|
accessibility/source/helper/characterattributeshelper \
|
|
accessibility/source/helper/IComboListBoxHelper \
|
|
accessibility/source/standard/accessiblemenubasecomponent \
|
|
accessibility/source/standard/accessiblemenucomponent \
|
|
accessibility/source/standard/accessiblemenuitemcomponent \
|
|
accessibility/source/standard/floatingwindowaccessible \
|
|
accessibility/source/standard/svtaccessiblenumericfield \
|
|
accessibility/source/standard/vclxaccessiblebox \
|
|
accessibility/source/standard/vclxaccessiblebutton \
|
|
accessibility/source/standard/vclxaccessiblecheckbox \
|
|
accessibility/source/standard/vclxaccessiblecombobox \
|
|
accessibility/source/standard/vclxaccessibledropdowncombobox \
|
|
accessibility/source/standard/vclxaccessibledropdownlistbox \
|
|
accessibility/source/standard/vclxaccessibleedit \
|
|
accessibility/source/standard/vclxaccessiblefixedhyperlink \
|
|
accessibility/source/standard/vclxaccessiblefixedtext \
|
|
accessibility/source/standard/vclxaccessibleheaderbar \
|
|
accessibility/source/standard/vclxaccessibleheaderbaritem \
|
|
accessibility/source/standard/vclxaccessiblelist \
|
|
accessibility/source/standard/vclxaccessiblelistbox \
|
|
accessibility/source/standard/vclxaccessiblelistitem \
|
|
accessibility/source/standard/vclxaccessiblemenu \
|
|
accessibility/source/standard/vclxaccessiblemenubar \
|
|
accessibility/source/standard/vclxaccessiblemenuitem \
|
|
accessibility/source/standard/vclxaccessiblemenuseparator \
|
|
accessibility/source/standard/vclxaccessiblepopupmenu \
|
|
accessibility/source/standard/vclxaccessibleradiobutton \
|
|
accessibility/source/standard/vclxaccessiblescrollbar \
|
|
accessibility/source/standard/vclxaccessiblestatusbar \
|
|
accessibility/source/standard/vclxaccessiblestatusbaritem \
|
|
accessibility/source/standard/vclxaccessibletabcontrol \
|
|
accessibility/source/standard/vclxaccessibletabpage \
|
|
accessibility/source/standard/vclxaccessibletabpagewindow \
|
|
accessibility/source/standard/vclxaccessibletextcomponent \
|
|
accessibility/source/standard/vclxaccessibletextfield \
|
|
accessibility/source/standard/vclxaccessibletoolbox \
|
|
accessibility/source/standard/vclxaccessibletoolboxitem \
|
|
))
|
|
|
|
# vim:set noet sw=4 ts=4:
|