diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2020-02-12 19:30:26 +0100 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2020-02-13 14:43:03 +0100 |
commit | adfd0914e3fe9a15f818b0979936d5f0ff545f32 (patch) | |
tree | fd477763b2a7659cb619a0529b651569a148476c /src/plugins | |
parent | 0e643bf7830949ade66e76a6eefa99b4b24c422b (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp index 5f564f81c2..93cfd095e4 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp @@ -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; diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp index ab04384616..682b8c19c0 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiautils.cpp @@ -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}, |