-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.2
-
None
Any QML Popup is not modal to the a11y layer. This means any "underlying" elements are still available to users of screen readers.
The attached video ModalPopupA11y.movdepicts the issue; after opening the modal Popup the text elements are still in the a11y tree. After opening another modal Popup, the first Popup and the underlying text elements are also visible to the screen reader.
Consider the following MWE:
pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls import QtQuick.Layouts ApplicationWindow { id: root property list<QtObject> dialogs function closeDialog() { let item = dialogs[dialogs.length - 1]; item.close(); item.destroy(); dialogs.length--; } function openDialog() { let item = popupComponent.createObject(root, { index: dialogs.length }); dialogs.push(item); item.open(); } height: 480 visible: true width: 640 ColumnLayout { anchors.centerIn: parent Repeater { model: 5 delegate: Text { required property int index Accessible.name: text Accessible.role: Accessible.StaticText Layout.fillWidth: true text: "Text element %1".arg(index) } } Button { text: "Open new dialog" onClicked: root.openDialog() } } Component { id: popupComponent Popup { required property int index anchors.centerIn: parent focus: true modal: true contentItem: ColumnLayout { Text { Accessible.name: text Accessible.role: Accessible.StaticText Layout.fillWidth: true text: "Modal dialog %1".arg(index) } Button { text: "Close dialog" onClicked: root.closeDialog() } Button { text: "Open new dialog" onClicked: root.openDialog() } } } } }
- relates to
-
QTBUG-138496 Accessibility on iOS / Android: underlying items are still active
-
- Reported
-
For Gerrit Dashboard: QTBUG-140200 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
676241,1 | a11y: Consider modal QML Popup for a11y hierarchy | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |