Skip to content

Commit 583c383

Browse files
committed
a11y uia: Notify about state changes of checkable item view items
To allow assistive technology on Windows to react to changes of the checked state of item view items send appropriate notifications also for the Cell, ListItem and TreeItem roles. Fixes: QTBUG-141856 Change-Id: I5ff341fa260ea95c0cf80bc25c141f9da0ea54da Reviewed-by: Michael Weghorn <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
1 parent 93fb8b0 commit 583c383

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,12 @@ void QWindowsUiaMainProvider::notifyStateChange(QAccessibleStateChangeEvent *eve
8282
{
8383
if (QAccessibleInterface *accessible = event->accessibleInterface()) {
8484
if (event->changedStates().checked || event->changedStates().checkStateMixed) {
85-
// Notifies states changes in checkboxes and switches.
85+
// Notifies states changes in checkboxes, switches, and checkable item view items.
8686
if (accessible->role() == QAccessible::CheckBox
87-
|| accessible->role() == QAccessible::Switch) {
87+
|| accessible->role() == QAccessible::Switch
88+
|| accessible->role() == QAccessible::Cell
89+
|| accessible->role() == QAccessible::ListItem
90+
|| accessible->role() == QAccessible::TreeItem) {
8891
if (auto provider = providerForAccessible(accessible)) {
8992
long toggleState = ToggleState_Off;
9093
if (accessible->state().checked)

0 commit comments

Comments
 (0)