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

[A11y][macOS] Using "Link" role and Accessible.description overwrites Accessible.name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.3
    • None
    • macOS

      When assigning an item the Accessible.Link role leads to a confusing behavior on macOS with VoiceOver. Using only Accessible.name works as expected. Using Accessible.description leads to VoiceOver reading the Accessible.name as the Accessible.description. Other platforms (Windows, Android, iOS) don't show this behavior.

      Example code:

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      
      ApplicationWindow {
          visible: true
      
          ColumnLayout {
              anchors.fill: parent
              Text {
                  text: "Example Heading"
                  Accessible.role: Accessible.Heading
                  Accessible.name: text
                  Accessible.description: "This is just an example."
              }
      
              Text {
                  Accessible.role: Accessible.Link
                  Accessible.name: text
                  Accessible.description: "Clicking the link will open it in your standard browser."
                  Accessible.onPressAction: Qt.openUrlExternally("https://www.qt.io/")
                  onLinkActivated:  Qt.openUrlExternally("https://www.qt.io/")
                  textFormat: Text.RichText
                  text: "Click this link: <a href=\"https://www.qt.io/\">https://www.qt.io/<\a>"
              }
          }
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jtrillma Jens Trillmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes