Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.1
-
None
-
Linux (reproduced on Fedora and TuxedoOS)
-
-
38f5768bc (dev)
Description
The property value has special semantics in at least some accessibility frameworks, and Qt implements this through QAccessibleValueInterface and QAccessibleValueChangeEvent. Even the QAccessible documentation points out that "the type ValueChange indicates that the position of a slider has been changed."
QtQuick's Accessible attached property seems to send such a QAccessibleValueChangeEvent each time an Item's value property change event is sent. This is not appropriate, as QAccessibleValueChangeEvent should only be used with things implementing QAccessibleValueInterface, and value is an appealing property name that developers are likely to use for many things where this interface is not relevant.
Small example that triggers the issue:
import QtQuick import QtQuick.Controls Button { text: value property int value: 0 onClicked: value++ }
Running this on Linux with qml while assistive technologies are enabled (e.g. orca running) causes an error of the following form to be printed each time the button is pressed:
qt.accessibility.atspi: ValueChanged event and no ValueInterface or ComboBox: QAccessibleInterface(0x5ce4d8c9b6b0 name="4" role=Button obj=Button_QMLTYPE_1_QML_12(0x5ce4d8c42a00)"focusable|focused"rect=QRect(0,0 80x35))
The incorrect assignment seems to happen at around line 350 in qquickaccessibleattached.cpp/ line 193 of qquickaccessibleattached_p.h, but I'm not 100% sure I followed this correctly so this may be wrong.
Alternatively, atspiadaptor could be adjusted to not print a warning here, but sending a QAccessibleValueChangeEvent seems semantically wrong here.
This is causing issues in KF6's kquickcharts, where the LegendDelegate's value property is used to display values in a Legend. This is used for e.g. system monitor widgets, which change very frequently, often multiple times per second, permanently. Displaying a few of these can cause a dozen warnings to be printed per second. See downstream issue.
Attachments
Issue Links
- is required for
-
QTBUG-133598 Accessibility: General improvements for Qt Quick and Qt Widgets
-
- Open
-
For Gerrit Dashboard: QTBUG-133564 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
632647,3 | Accessibility: Prevent false signal emissions | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |