diff options
author | Sharad Sahu <[email protected]> | 2023-09-21 19:33:52 +0530 |
---|---|---|
committer | Sharad Sahu <[email protected]> | 2023-09-24 13:32:05 +0530 |
commit | c2031c6153c9625f63bb1091a79317885fae52e2 (patch) | |
tree | 36f3161f2848fef0406f731b7cd2dae310305e12 | |
parent | 2e290e8f4b59531a76990d7f5e1125c4e6f9e4ba (diff) |
Create an accessible element for the dialog box
Change-Id: Idced1409b7f069f044833e96ea5c31fab0807c63
Reviewed-by: Morten Johan Sørvig <[email protected]>
-rw-r--r-- | tests/manual/wasm/a11y/qml_basic_item/AboutDialog.qml | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/tests/manual/wasm/a11y/qml_basic_item/AboutDialog.qml b/tests/manual/wasm/a11y/qml_basic_item/AboutDialog.qml index d9e8e4661a..272ab832a9 100644 --- a/tests/manual/wasm/a11y/qml_basic_item/AboutDialog.qml +++ b/tests/manual/wasm/a11y/qml_basic_item/AboutDialog.qml @@ -10,36 +10,40 @@ Dialog { height: 150 title: "WebAssembly Dialog box" modal: true - Rectangle { + + background: Rectangle { width: parent.width * 0.8 height: parent.height * 0.4 color: "lightgray" anchors.fill: parent - ColumnLayout { - spacing: 2 - anchors.fill: parent + Accessible.role: Accessible.Dialog + Accessible.name: parent.title + Accessible.description: "The About Dialog box." + } + ColumnLayout { + spacing: 2 + anchors.fill: parent - Label { - id: labelInfo - Layout.alignment: Qt.AlignCenter - text: "Accessibility Demo sample application developed in QML." - Accessible.role: Accessible.StaticText - horizontalAlignment: Text.AlignHCenter - Accessible.name: text - Accessible.description: "Purpose of this application." - wrapMode: Text.WordWrap - } + Label { + id: labelInfo + Layout.alignment: Qt.AlignCenter + text: "Accessibility Demo sample application developed in QML." + Accessible.role: Accessible.StaticText + horizontalAlignment: Text.AlignHCenter + Accessible.name: text + Accessible.description: "Purpose of this application." + wrapMode: Text.WordWrap + } - Button { - id: closeButton - text: "Close" - Layout.alignment: Qt.AlignCenter - Accessible.role: Accessible.Button - Accessible.name: text - Accessible.description: "To close the About Dialog box." - onClicked: { - aboutDialog.close() - } + Button { + id: closeButton + text: "Close" + Layout.alignment: Qt.AlignCenter + Accessible.role: Accessible.Button + Accessible.name: text + Accessible.description: "To close the About Dialog box." + onClicked: { + aboutDialog.close() } } } |