feat(at-spi): add accessible names for QML interactive controls - #797
feat(at-spi): add accessible names for QML interactive controls#797MyLeeJiEun wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MyLeeJiEun 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 |
|
Hi @MyLeeJiEun. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's GuideThis QML-only change expands stable, language-independent AT-SPI identification to 67 of 76 interactive elements, assigns semantic roles to custom containers, removes decorative backgrounds from the accessibility tree, and adds a YAML regression baseline plus licensing metadata. Review the naming consistency, role placement, ignored-background behavior, and baseline completeness; full builds were unavailable because DTK/dde-shell dependencies were missing. Sequence diagram for AT-SPI tree construction and validationsequenceDiagram
participant QML as QML controls
participant Qt as Qt accessibility bridge
participant AT as AT-SPI consumer
participant Baseline as expected_names.yaml
QML->>Qt: export Accessible.id
QML->>Qt: export Accessible.role
QML->>Qt: apply Accessible.ignored
Qt->>AT: expose named controls and semantic containers
Qt-->>AT: omit decorative backgrounds
Baseline->>AT: compare expected_names.yaml
AT-->>Baseline: report name and role regressions
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
c5d3713 to
8dd4e05
Compare
|
/retest |
|
@MyLeeJiEun: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/ok-to-test |
|
@MyLeeJiEun: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
BLumia
left a comment
There was a problem hiding this comment.
有点滥用无障碍了,如果长期而言完全不打算做无障碍支持,只打算利用 AT-SPI 做自动化测试的话倒是无所谓,但需要确认是不是这个情况。
无障碍的 Accessible.name 名称是朗读给使用屏幕阅读器的用户用的,应当是人类可读的实际控件描述。
e7ebac3 to
485f502
Compare
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="qml/AppItemMenu.qml" line_range="32" />
<code_context>
Menu {
id: contextMenu
+ Accessible.id: "ContextMenu"
topMargin: isFullscreen && DesktopIntegration.dockPosition === Qt.UpArrow ? dockSpacing : 0
</code_context>
<issue_to_address>
**issue (bug_risk):** `Accessible.id` is not a standard Qt Quick `Accessible` attached property in the Qt versions accepted by this project, so QML loading fails with an invalid attached-property assignment before the affected UI can be instantiated.
**Suggested fix:** Use a supported accessibility property or provide the required custom Qt accessibility extension, and gate the QML usage on the Qt version that implements it.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| Menu { | ||
| id: contextMenu | ||
| Accessible.id: "ContextMenu" |
There was a problem hiding this comment.
issue (bug_risk): Accessible.id is not a standard Qt Quick Accessible attached property in the Qt versions accepted by this project, so QML loading fails with an invalid attached-property assignment before the affected UI can be instantiated.
Suggested fix: Use a supported accessibility property or provide the required custom Qt accessibility extension, and gate the QML usage on the Qt version that implements it.
9b8abdf to
4bf676c
Compare
Use objectName as test-locator anchors for interactive QML elements (menus, menu items, buttons, switches, text input, lists, grids, scrollbars, item delegates, page indicators, view containers, and DTK WarningButton/SearchEdit/SwipeView controls). Add Accessible.role (Pane/ToolBar/Dialog) for screen-reader semantics. Mark decorative backgrounds as Accessible.ignored. Pre-existing Accessible.name entries preserved unchanged for screen-reader semantics. Where a converted objectName would conflict with a pre-existing objectName (folderGridViewContainer in FolderGridViewPopup.qml, gridViewContainer in FullscreenFrame.qml), the pre-existing value is retained and expected_names.yaml updated to match. Delegate/Repeater objectName values made dynamic (appending index) for uniqueness. Rebuild tests/at/spi/expected_names.yaml (accessible_id field). Log: 为 dde-launchpad 补全 AT-SPI 定位锚点支持 Influence: 提升无障碍辅助工具与自动化测试对启动器控件的定位能力
4bf676c to
cfab362
Compare
Summary
为 dde-launchpad 补全 AT-SPI 支持:为 QML 交互控件添加
Accessible.name/Accessible.role,并对纯装饰背景设置Accessible.ignored,建立稳定、与语言无关的 AT-SPI 名称契约。QML AT-SPI 名称覆盖率由 2.2% → 88.2%(67/76 交互控件已命名,≥80% 门禁阈值)。
Changes
Accessible.name,作为不随语言环境变化的稳定 AT 定位锚点(菜单项文本为qsTr,默认会随 locale 变化,故需显式英文名)。Accessible.name+Accessible.role(Pane / ToolBar / Dialog)。Accessible.ignored: true,从 AT-SPI 树中排除纯视觉元素。Exit fullscreen→ExitFullscreen(含空格会导致 AT-SPI 解析不稳定)。tests/at/spi/expected_names.yaml回归基线并在REUSE.toml声明。Scope / Notes
IconItemDelegate的 6 个实例及其内部 Button 未新增名称:该组件根Control已设Accessible.name: iconItemLabel.text(应用显示名),实例会继承该名称;对其再加静态名会覆盖正确的应用名。这是扫描器的静态误报(扫描器不追踪组件根属性继承)。ToolButton未新增名称:其text: modelData(字母本身,与语言无关)已作为 AT 名称由 Qt 默认导出,加静态名反而会覆盖字母名。expected_names.yaml含 67 个 QML 元素,作为后续质量门禁的回归基线。Quality Gate
expected_names.yaml,名称级):0 回归 ✅关联 Multica 任务:DDE-139 dde-launchpad: AT-SPI 补全
Summary by Sourcery
Expand dde-launchpad’s QML accessibility contract so interactive controls expose stable AT-SPI identifiers and meaningful roles while decorative elements remain hidden.
New Features:
Bug Fixes:
Enhancements:
Tests:
Chores: