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

QML Text link behavior with screen reader depends on textFormat property

XMLWordPrintable

    • macOS

      The behavior of QML text in regards to the screen reader differ from the set textFormat property:

      PlainText, RichText, MarkdownText: The text is read as is, with its role "link" prepended ("link, This is a dummy text ...")

      StyledText:

      • Firstly, "link, embedded link" is read, then a hint, that the link may be clicked using Control + Option + Space (which does not work)
      • The group may be entered with Control + Shift + Option + Arrow Down, it will then read "In link, embedded link, link, embedded link".
      • Pressing Control + Option + Space to open the link works here.
      • The actual text property is never announced to the user, only the link.

      See this MWE to replicate the behavior.

      import QtQuick
      
      Window {
      	id: root
      
      	readonly property string linkText: "This is a dummy text. With an <a href=\"http://qt.io\">embedded link</a> and textFormat %1."
      
      	height: 480
      	title: qsTr("Hello World")
      	visible: true
      	width: 640
      
      	Column {
      		anchors.centerIn: parent
      
      		A11yText {
      			text: root.linkText.arg("PlainText")
      			textFormat: Text.PlainText
      		}
      		A11yText {
      			text: root.linkText.arg("StyledText")
      			textFormat: Text.StyledText
      		}
      		A11yText {
      			text: root.linkText.arg("RichText")
      			textFormat: Text.RichText
      		}
      		A11yText {
      			text: root.linkText.arg("MarkdownText")
      			textFormat: Text.MarkdownText
      		}
      	}
      
      	component A11yText: Text {
      		Accessible.name: text
      		Accessible.role: Accessible.Link
      
      		onLinkActivated: link => Qt.openUrlExternally(link)
      	}
      }
      
      

        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
            janmoeller Jan Möller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes