From 0571d9617633a993f3a40e388ac426d78a376ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Tue, 21 Jul 2009 10:02:27 +0200 Subject: 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 --- src/gui/accessible/qaccessible.h | 1 + src/gui/accessible/qaccessible_win.cpp | 2 ++ 2 files changed, 3 insertions(+) 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 { -- cgit v0.12