Skip to content

fix: 补全 AT-SPI objectName 定位锚点 (DDE-162) - #497

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/at-spi-completion-2026-08-24
Sep 4, 2026
Merged

fix: 补全 AT-SPI objectName 定位锚点 (DDE-162)#497
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/at-spi-completion-2026-08-24

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes DDE-162

概述

为 dde-tray-loader 仓库补全 AT-SPI 无障碍访问支持,对缺少 setObjectName() / setAccessibleName() 调用的 Qt/DTK 控件实例逐一补全,方便辅助技术(屏幕阅读器等)识别和操作。

改动内容

  • 14 个源码文件中为 18 个控件实例补全 setObjectName() / setAccessibleName() 调用。
    • QAction 仅添加 setObjectName()
    • QMenu 及其他 widget 同时添加 setObjectName()setAccessibleName()
  • 同步相关文件的 SPDX 版权年份至 2026。
  • 新增 tests/at/spi/expected_names.yaml,记录补全后控件的期望名称清单。

覆盖率对比

指标 补全前 补全后
控件总数 23 23
已命名控件 1 19
缺口数 22 4(误报跳过)
覆盖率 4.3% ~82.6%

说明

  • 本仓库无 QML 元素,expected_names.yamlqml_elements 为空。
  • 4 个跳过项为误报(外部指针引用或非新建控件),已在报告中说明。

测试

  • 仅添加 setObjectName() / setAccessibleName() 调用,不修改已有逻辑,不涉及格式化、lint 或重构。
  • 因缺少完整构建依赖,未进行本地编译验证,建议在 CI 环境验证。

Summary by Sourcery

Complete AT-SPI naming coverage for dock and loader controls to make them reliably discoverable by assistive technologies.

New Features:

  • Add accessibility object names and accessible-name anchors to previously unnamed Qt and DTK controls across dock plugins and loader menus, improving AT-SPI identification and interaction.

Enhancements:

  • Define the expected accessibility names and tracked widget metadata in a new AT-SPI expectations file.
  • Update SPDX copyright years for the affected source files.

Tests:

  • Add an AT-SPI expected-name inventory covering the newly named controls.

@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 Aug 24, 2026

Copy link
Copy Markdown

Reviewer's Guide

本 PR 在 14 个 UI 源码文件中为 dock、快捷面板、菜单、动作及投屏等控件补充稳定的 AT-SPI 对象名称,并新增 expected_names.yaml 作为自动化覆盖率基线;同时同步 SPDX 年份。变更不涉及既有业务逻辑,但本地未完成编译验证,审核时应重点核对名称清单与实际控件创建位置、类型及运行时 AT-SPI 结果是否一致。

File-Level Changes

Change Details Files
补全 Qt/DTK 控件及动作的 AT-SPI 对象名称锚点
  • 为 18 个既有控件实例添加 setObjectName();QMenu 和 widget 另补充 setAccessibleName()(按 PR 描述)
  • 覆盖蓝牙、快捷面板、日历、护眼、键盘布局、无线投屏及 dock plugin context menu 等 UI
  • 保持现有 UI 逻辑不变,仅在控件初始化或创建后设置稳定名称
plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp
plugins/dde-dock/bluetooth/quickpanelwidget.cpp
plugins/dde-dock/common/commonapplet.cpp
plugins/dde-dock/common/pluginitemdelegate.cpp
plugins/dde-dock/common/slidercontainer.cpp
plugins/dde-dock/datetime/calendar/sidebarcalendarwidget.cpp
plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp
plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp
plugins/dde-dock/keyboard-layout/dbusadaptors.cpp
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp
src/loader/pluginitem.cpp
src/loader/quickpluginitem.cpp
新增 AT-SPI 名称期望清单,作为覆盖率检查基线
  • 记录 18 个控件/动作的变量、类型、对象名、源码位置和类信息
  • 声明当前仓库无 QML 元素及临时元素
tests/at/spi/expected_names.yaml
更新受影响文件的 SPDX 版权年份
  • 将相关版权声明年份同步至 2026
  • 补齐部分文件末尾换行
plugins/dde-dock/bluetooth/quickpanelwidget.cpp
plugins/dde-dock/common/commonapplet.cpp
plugins/dde-dock/common/slidercontainer.cpp
plugins/dde-dock/datetime/calendar/sidebarcalendarwidget.cpp
plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp
plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp
plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp
src/loader/quickpluginitem.cpp
tests/at/spi/expected_names.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from 1a09590 to 529b0af Compare August 26, 2026 03:51
@MyLeeJiEun MyLeeJiEun changed the title fix: 补全 AT-SPI accessibleName 支持 fix: 补全 AT-SPI accessibleName 支持 (DDE-162) Aug 26, 2026
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from 7ab7d69 to 7a8cc91 Compare August 26, 2026 06:38
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch 2 times, most recently from c68e983 to 6f22ab0 Compare August 28, 2026 03:46
@MyLeeJiEun MyLeeJiEun changed the title fix: 补全 AT-SPI accessibleName 支持 (DDE-162) fix: 补全 AT-SPI objectName 定位锚点 (DDE-162) Aug 28, 2026
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from 6f22ab0 to 57f78da Compare September 1, 2026 03:37
@MyLeeJiEun
MyLeeJiEun marked this pull request as ready for review September 1, 2026 06:44
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from 57f78da to 4cca778 Compare September 1, 2026 06:44

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, 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

Add setObjectName() to 18 widget instances across 14 files as the AT-SPI
test locator anchor. Per DDE-198, setObjectName() (objectName → AT-SPI
AccessibleId) is the sole test locator anchor; setAccessibleName() is
reserved for screen-reader semantics only and is not used as a locator.

为 14 个文件的 18 个控件实例补全 setObjectName(),作为 AT-SPI 测试定位锚点。
依 DDE-198 规则,setObjectName() 为唯一定位锚点,setAccessibleName() 仅保留读屏语义。

Log: 补全 AT-SPI 定位锚点(objectName)
Influence: 提升托盘加载器控件的无障碍访问覆盖率,方便辅助技术与测试定位。

Closes DDE-162
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from 4cca778 to db26233 Compare September 4, 2026 02:53
@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot

deepin-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

This pr cannot be merged! (status: blocked)

@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit eff62f6 into linuxdeepin:master Sep 4, 2026
5 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