Windows QPA: Add support to IsDialog UIA property
Adding support to the IsDialog property within the UI Automation code. This property allows dialog windows to be identified as such, which may be used by screen readers to better describe them. Fixes: QTBUG-82019 Change-Id: I6f5478dd30f63f152cba75886a9e0eb38772037a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
0e643bf783
commit
adfd0914e3
@ -219,5 +219,6 @@
|
||||
#define UIA_CenterPointPropertyId 30165
|
||||
#define UIA_RotationPropertyId 30166
|
||||
#define UIA_SizePropertyId 30167
|
||||
#define UIA_IsDialogPropertyId 30174
|
||||
|
||||
#endif
|
||||
|
@ -448,6 +448,10 @@ HRESULT QWindowsUiaMainProvider::GetPropertyValue(PROPERTYID idProp, VARIANT *pR
|
||||
setVariantBool(wt == Qt::Popup || wt == Qt::ToolTip || wt == Qt::SplashScreen, pRetVal);
|
||||
}
|
||||
break;
|
||||
case UIA_IsDialogPropertyId:
|
||||
setVariantBool(accessible->role() == QAccessible::Dialog
|
||||
|| accessible->role() == QAccessible::AlertMessage, pRetVal);
|
||||
break;
|
||||
case UIA_FullDescriptionPropertyId:
|
||||
setVariantString(accessible->text(QAccessible::Description), pRetVal);
|
||||
break;
|
||||
|
@ -161,7 +161,7 @@ long roleToControlTypeId(QAccessible::Role role)
|
||||
{QAccessible::Sound, UIA_CustomControlTypeId},
|
||||
{QAccessible::Cursor, UIA_CustomControlTypeId},
|
||||
{QAccessible::Caret, UIA_CustomControlTypeId},
|
||||
{QAccessible::AlertMessage, UIA_CustomControlTypeId},
|
||||
{QAccessible::AlertMessage, UIA_WindowControlTypeId},
|
||||
{QAccessible::Window, UIA_WindowControlTypeId},
|
||||
{QAccessible::Client, UIA_GroupControlTypeId},
|
||||
{QAccessible::PopupMenu, UIA_MenuControlTypeId},
|
||||
|
Loading…
Reference in New Issue
Block a user