Windows QPA: Export "checkable" info for menu items through UI Automation
In order to allow screen readers to say checked/unchecked for checkable menu items, this information has to be provided through UI Automation. Checkable menu items should implement the "Toggle" UI Automation pattern. The "checkable" state must also be supported by QAccessibleMenuItem, which is being added by a separated change. Task-number: QTBUG-80551 Change-Id: I661668310d1b6b4701d0c0efdb1dcfd15d0db729 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
e40e82ede1
commit
b209270825
|
|
@ -289,7 +289,8 @@ HRESULT QWindowsUiaMainProvider::GetPatternProvider(PATTERNID idPattern, IUnknow
|
|||
break;
|
||||
case UIA_TogglePatternId:
|
||||
// Checkbox controls.
|
||||
if (accessible->role() == QAccessible::CheckBox) {
|
||||
if (accessible->role() == QAccessible::CheckBox
|
||||
|| (accessible->role() == QAccessible::MenuItem && accessible->state().checkable)) {
|
||||
*pRetVal = new QWindowsUiaToggleProvider(id());
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue