Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.14.0, 5.15.0
-
None
-
Windows 10, Visual Studio 2017 and 2019. QT 5.14 and 5.15, default QT Quick project built by QT VS Tools 2.5.2 rev 1
Description
When using a WebEngineView inside a simple QML window I noticed that screen readers don't work properly when that view isn't aligned to the top of the window. If the view is offset it appears as though the coordinates fed to the screen reader ignore the offset. I.e. if you offset by N pixels then hovering N pixels above a web element will have the screen reader read that element (see screenshot below)
See attached cpp/qml files for full example. In that qml file commenting out the WebEngineView's anchors.topMargin results in the correct screen reader behaviour (tested with NVDA)
Steps to Reproduce
- Make a new QT Quick project with the attached cpp/qml files
- Run NVDA
- Consider also opening the Speech Viewer tool from NVDA's taskbar icon's context menu for easier debugging
- Run the QT project
- Hover over the various elements on the loaded url (I've used Google, but feel free to change that in the qml file)
- See that the screen reader works properly, reading (and displaying if you have the Viewer enabled) each element on the web page
- Now edit the qml file to enable the topMargin in the WebEngineView, offsetting the view by 200 pixels
- Rerun the project
- Hover over the various elements on the loaded url, also move your mouse 200 pixels above them
- See that the screen reader ignores each element when directly over top of them, but does recognize them when the mouse is 200 pixels above where the element is displayed
Screenshots:
Correct behaviour, no offset
Incorrect behaviour when web view offset