Skip to content

Commit 25cb080

Browse files
frankosterfeldQt Cherry-pick Bot
authored andcommitted
a11y Windows: Correctly announce tristate checkboxes
Make sure partially-checked Qt Quick check boxes are correctly announced, i.e. as partially checked instead of unchecked. For at least Controls.CheckBox and Controls.CheckBoxDelegate, checkStateMixed does not imply checked to be set. Task-number: QTBUG-146686 Change-Id: I70b99885a3d66653a8eb1f58862dd00acdbd70ec Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 9f5a139) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1 parent 6005817 commit 25cb080

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaToggleProvider::get_ToggleState(ToggleState
5757
if (!accessible)
5858
return UIA_E_ELEMENTNOTAVAILABLE;
5959

60-
if (accessible->state().checked)
61-
*pRetVal = accessible->state().checkStateMixed ? ToggleState_Indeterminate : ToggleState_On;
62-
else
63-
*pRetVal = ToggleState_Off;
60+
if (accessible->state().checkStateMixed)
61+
*pRetVal = ToggleState_Indeterminate;
62+
else if (accessible->state().checked)
63+
*pRetVal = ToggleState_On;
6464
return S_OK;
6565
}
6666

0 commit comments

Comments
 (0)