Our accessibilityWindow implementation asks the parent for it's window, expecting that it will always be the same. This is conceptually correct. However, as we don't represent windows through QAccessibilityInterface and instead rely on the natively provided element, the filtering out of ignored elements result in accessibilityParent return a null object once the parent is the window. Instead, check if we get an interface that represents a Window, and if so fall through to the code returning the NSView (after going through QAcessibilityInterface::window call, which was so far missing). And if we then get a Window element as the parent, then we don't have to call accessibilityWindow on that parent again. Instead, return the result directly and only keep going if we got some other element. Add a test case that confirms that we now get a valid result for the window attribute. Pick-to: 6.10 6.9 6.8 6.5 Fixes: QTBUG-137157 Change-Id: Ifa485734b290284bd5a1286e3b3c18454442fa10 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%