Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85628

Screen readers don't work properly when WebEngineView not aligned to top of window

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.0, 5.15.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      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
    • Platform/s:
      Windows

      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

      1. Make a new QT Quick project with the attached cpp/qml files
      2. Run NVDA
        • Consider also opening the Speech Viewer tool from NVDA's taskbar icon's context menu for easier debugging
      3. Run the QT project
      4. Hover over the various elements on the loaded url (I've used Google, but feel free to change that in the qml file)
      5. See that the screen reader works properly, reading (and displaying if you have the Viewer enabled) each element on the web page
      6. Now edit the qml file to enable the topMargin in the WebEngineView, offsetting the view by 200 pixels
      7. Rerun the project
      8. Hover over the various elements on the loaded url, also move your mouse 200 pixels above them
      9. 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

        Attachments

        1. main.cpp
          0.4 kB
        2. main.qml
          0.6 kB
        3. qml.qrc
          0.1 kB
        4. QTBUG-85628_CorrectBehaviour_NoOffset.png
          QTBUG-85628_CorrectBehaviour_NoOffset.png
          46 kB
        5. QTBUG-85628_IncorrectBehaviour_200PxOffset.png
          QTBUG-85628_IncorrectBehaviour_200PxOffset.png
          62 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            frederik Frederik Gladhorn
            Reporter:
            lyon Steven Lyon
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes