feat(dock): add accessibility annotations to dock QML#1669
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hualet The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Expose the taskbar to screen readers (e.g. Orca over AT-SPI) via Qt Quick Accessible attached properties: - app items: button role, app name, active/attention description - task manager and dock left/center/right areas: grouping role + name - container list views: list role - show desktop / multitask view / tray action buttons: role + name - embedded tray surfaces: plugin display name when available
0f5bebc to
88f8d43
Compare
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 以 multitaskview.qml 为例,提供默认值防止无障碍名称缺失
AppletDockItem {
id: toggleworkspace
dockOrder: 15
Accessible.role: Accessible.Button
Accessible.name: toolTip.text ? toolTip.text : qsTr("Multitasking View")
PanelToolTip {
id: toolTip
text: qsTr("Multitasking View")
}
} |
Summary
Add Qt Quick
Accessibleattached properties to the dock panel QML so screen readers (e.g. Orca over AT-SPI) can read the taskbar:Buttonrole, app name, and "Active"/"Demands attention" state descriptionGroupingrole with names (plain names without a role map to AT-SPIfillerand get ignored by Orca)ListroleButtonrole + name, reusing existing toolTip textdisplayNamewhen availableAnnotations only — no focus, behavior, or layout changes (+31 lines across 10 QML files).
Test
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1, at-spi2): the dock window exposes "Dock Left/Center/Right Area", "Task Manager", per-app[button]nodes with names (文件管理器 / Google Chrome / …), and the active window carries the "Active" description, by walking the AT-SPI tree via GI.Out of scope (follow-ups)
Qt.WindowDoesNotAcceptFocus+ layer-shell keyboard interactivity)