summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-07-21 08:02:27 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-07-21 08:14:20 (GMT)
commit0571d9617633a993f3a40e388ac426d78a376ce2 (patch)
tree0f3e9e4212c32813f0bca04f477fc45deda0bd49 /src
parentc6d243df383514f2bf30e178eba087a312191b0f (diff)
downloadQt-0571d9617633a993f3a40e388ac426d78a376ce2.zip
Qt-0571d9617633a993f3a40e388ac426d78a376ce2.tar.gz
Qt-0571d9617633a993f3a40e388ac426d78a376ce2.tar.bz2
LayeredPane should not be reported as an IP address edit control to MSAA
The reason was that ROLE_SYSTEM_IPADDRESS = 0x3F has been added to MSAA at one point in time. (Can be found in recent versions of OleAcc.idl). Since the MSAA bridge used a direct mapping between QAccessible::Role and MSAA roles this lead to that LayeredPane was interpreted to be an IP address edit control, affecting QStackedWidget (and some relatives). This caused some screen readers to be confused when the same accessible interface had children such as push buttons. I also discussed this change with Harald. Task-number: 257958
Diffstat (limited to 'src')
-rw-r--r--src/gui/accessible/qaccessible.h1
-rw-r--r--src/gui/accessible/qaccessible_win.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 19080de..8dc8159 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -210,6 +210,7 @@ public:
PageTabList = 0x0000003C,
Clock = 0x0000003D,
Splitter = 0x0000003E,
+ // Additional Qt roles where enum value does not map directly to MSAA:
LayeredPane = 0x0000003F,
UserRole = 0x0000ffff
};
diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp
index bfacb94..85f1a8d 100644
--- a/src/gui/accessible/qaccessible_win.cpp
+++ b/src/gui/accessible/qaccessible_win.cpp
@@ -1051,6 +1051,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accRole(VARIANT varID, VARIANT
Role role = accessible->role(varID.lVal);
if (role != NoRole) {
+ if (role == LayeredPane)
+ role = QAccessible::Pane;
(*pvarRole).vt = VT_I4;
(*pvarRole).lVal = role;
} else {