Windows QPA: Avoid returning UI Automation ValueProvider for static text
Static text controls should not return a ValueProvider. Otherwise, Narrator reads out static texts and announces whether they are editable or not, which is confusing to users. It should only read out the text itself. Fixes: QTBUG-79613 Change-Id: I080cd6a5db10f6f673b50c40ac7d87c3737d9b55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
ef54abae43
commit
26f8adb1ee
@ -277,7 +277,8 @@ HRESULT QWindowsUiaMainProvider::GetPatternProvider(PATTERNID idPattern, IUnknow
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case UIA_ValuePatternId:
|
case UIA_ValuePatternId:
|
||||||
// All accessible controls return text(QAccessible::Value) (which may be empty).
|
// All non-static controls support the Value pattern.
|
||||||
|
if (accessible->role() != QAccessible::StaticText)
|
||||||
*pRetVal = new QWindowsUiaValueProvider(id());
|
*pRetVal = new QWindowsUiaValueProvider(id());
|
||||||
break;
|
break;
|
||||||
case UIA_RangeValuePatternId:
|
case UIA_RangeValuePatternId:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user