Skip to content

feat(at-spi): make QML anchor ids unique and close operable gaps - #3577

Merged
mhduiy merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/at-spi-completion-2026-09-28
Oct 28, 2026
Merged

mhduiy merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/at-spi-completion-2026-09-28

Conversation

@MyLeeJiEun

Copy link
Copy Markdown
Contributor

No description provided.

@deepin-ci-robot

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@sourcery-ai

sourcery-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Sorry @MyLeeJiEun, your pull request is larger than the review limit of 150,000 diff characters

@deepin-bot

deepin-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 6.1.112
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #3578

@deepin-bot

deepin-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 6.1.113
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #3581

@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-09-28 branch 2 times, most recently from cafde0f to 118701b Compare October 28, 2026 03:29
1. Give reusable components a passable accessibleId property with a static
   fallback (DccCheckIcon, DccTimeRange, DccRightView, WallpaperSelectView,
   CustomComboBox, FontCombobox, CustomTipsSlider, SpinboxEx, CustomComBobox,
   ImageCheckBox, EditActionLabel, AutoSizingComboBox, KeySequenceDisplay) so
   instances no longer share one id.
2. Append a dynamic suffix to every anchor that lives inside a delegate or
   Repeater body (list rows, menu entries, combo popup items), which otherwise
   duplicate once the list has more than one row.
3. Pass a unique value at every usage point and tag the remaining plugin-side
   DccObject nodes, which had no anchor at all.
4. Close the last 9 operable gaps found by a rescan: AddFaceinfoDialog/
   AddFingerDialog/AddIrisDialog ListView, DevelopModePage RecommandButton,
   and the RegisterDialog/VerifyDialog buttons.
5. Disambiguate the 3 cross-module duplicates that predated this change
   (Common_Switch / Common_TextField / CustomComboBox_*) with a module prefix.
6. Drop the 6 Accessible.id values wrongly attached to Menu popups, which are
   not Items and made Qt emit "Accessible must be attached to an Item or an
   Action" while the anchor never reached the AT-SPI tree.
7. Rebuild tests/at/spi/expected_names.yaml from the current source: 583
   elements / 583 unique ids.
8. Update copyright years to 2026 for the touched files that lagged.

Log: Operable-element anchor coverage reaches 100%; 27 pages scanned with
     zero duplicate ids.
Influence: AT-SPI locators are stable, per-instance unique and actually
           reachable through the accessibility tree.

feat(at-spi): 修复 QML 锚点重名并补齐可操作元素缺口

1. 为可复用组件新增可传入的 accessibleId 属性并保留静态回退
   (DccCheckIcon、DccTimeRange、DccRightView、WallpaperSelectView、
   CustomComboBox、FontCombobox、CustomTipsSlider、SpinboxEx、CustomComBobox、
   ImageCheckBox、EditActionLabel、AutoSizingComboBox、KeySequenceDisplay),
   避免多实例共用同一个 id。
2. 凡是位于 delegate / Repeater 体内的锚点一律追加动态后缀——否则列表项
   多于一行的瞬间就会同名(列表行、菜单项、下拉选项)。
3. 在全部使用点传入唯一值,并为此前完全没有锚点的插件侧 DccObject 节点补充锚点。
4. 修复重扫发现的最后 9 处可操作元素缺口:AddFaceinfoDialog/
   AddFingerDialog/AddIrisDialog 的 ListView、DevelopModePage 的
   RecommandButton,以及 RegisterDialog/VerifyDialog 的按钮。
5. 为本次改动前就已存在的 3 处跨模块重名(Common_Switch /
   Common_TextField / CustomComboBox_*)加模块前缀消歧。
6. 删除 6 处错误挂在 Menu 弹层上的 Accessible.id——Menu 不是 Item,Qt 会报
   "Accessible must be attached to an Item or an Action" 且锚点无法进入 AT-SPI 树。
7. 按当前源码重建 tests/at/spi/expected_names.yaml:583 条 / 583 个唯一 id。
8. 将相关文件的许可协议年份更新至 2026。

Log: 可操作元素锚点覆盖率达到 100%;实测 27 个页面零重名。
Influence: 所有可操作 QML 控件均具备稳定、逐实例唯一且可在无障碍树中
           实际取到的 AT-SPI 定位锚点。
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-09-28 branch from 118701b to a73e3f0 Compare October 28, 2026 03:34
@MyLeeJiEun
MyLeeJiEun requested a review from mhduiy October 28, 2026 03:47
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 98 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交为 dde-control-center 添加 AT-SPI 无障碍辅助支持,通过在 DccObject 中新增 accessibleId 属性并在 QML delegate 组件中绑定 Accessible.id,实现了自动化测试的控件定位能力。四维度分析均通过,无安全漏洞,代码结构清晰、注释完善,仅在 Accessible.id 绑定模式的一致性上存在轻微改进空间。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 建议在 DccItem.qml 和 DccEditorItem.qml 中也对 Accessible.id 添加回退逻辑,例如:Accessible.id: model.item.accessibleId !== "" ? model.item.accessibleId : (model.item.name || "DccItem"),确保所有控件在未显式设置 accessibleId 时仍有可用的默认标识。


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 无


💡 改进建议代码示例

// DccItem.qml 建议修改:添加空值回退 // 修改前: //   Accessible.id: model.item.accessibleId // 修改后: //   Accessible.id: model.item.accessibleId !== "" ? model.item.accessibleId : (model.item.name || "DccItem") // // DccEditorItem.qml 同理: //   Accessible.id: model.item.accessibleId !== "" ? model.item.accessibleId : (model.item.name || "DccEditorItem")

本报告由 AI 代码审查工具自动生成

@MyLeeJiEun MyLeeJiEun changed the title Fix/at spi completion 2026 09 28 feat(at-spi): make QML anchor ids unique and close operable gaps Oct 28, 2026
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy, MyLeeJiEun

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mhduiy
mhduiy merged commit d2c33f6 into linuxdeepin:master Oct 28, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants