Skip to content

fix(at-spi): 补全 deepin-update-ui AT-SPI 无障碍名称 - #333

Open
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/at-spi-completion-2026-08-24
Open

fix(at-spi): 补全 deepin-update-ui AT-SPI 无障碍名称#333
MyLeeJiEun wants to merge 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

任务概述

deepin-update-ui 补全 AT-SPI 无障碍名称,使辅助技术能够正确定位所有交互控件。

扫描结果

  • 补全前:9 个控件,4 个有名称,5 个缺口,覆盖率 44.4%
  • 补全后:9 个控件,0 个缺口,覆盖率 100%

补全内容

共修改 3 个源码文件,为 5 个缺口控件新增 setObjectName + setAccessibleName,并为 4 个已有控件补充唯一 objectName(消除跨文件重复):

文件 控件 变更
recoverydialog.cpp m_rebootBtn +objectName/accessibleName
recoverydialog.cpp m_confirmBtn +objectName/accessibleName
updatewidget.cpp m_logTextEdit +objectName/accessibleName
updatewidget.cpp m_exportButton +objectName/accessibleName
updatewidget.cpp m_showLogButton +objectName/accessibleName
updatewidget.cpp m_waitingView +唯一 objectName
updatewidget.cpp m_progressBar +唯一 objectName
checksystemwidget.cpp m_waitingView +唯一 objectName
checksystemwidget.cpp m_progressBar +唯一 objectName

验证

  • dde-updatedde-rollback 本地编译通过
  • 质量门禁(quality_gate)通过:覆盖率 100%,0 新增缺口
  • 提交 tests/at/spi/expected_names.yaml 作为回归基线

关联

Multica 任务:DDE-163

Summary by Sourcery

Complete AT-SPI naming for update and recovery UI controls to make all interactive elements reliably discoverable by assistive technologies.

New Features:

  • Add complete object and accessibility naming coverage for interactive controls in the update and recovery interfaces.

Bug Fixes:

  • Fix missing and non-unique AT-SPI identifiers that prevented assistive technologies from reliably locating controls.

Enhancements:

  • Establish distinct names for repeated progress, waiting, log, action, and navigation controls across related views.

Tests:

  • Add an expected AT-SPI naming baseline covering persistent and dynamically created controls.

Chores:

  • Add reuse metadata for the new accessibility naming test baseline.

@deepin-ci-robot

Copy link
Copy Markdown

[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.

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

@sourcery-ai

sourcery-ai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Reviewer's Guide

通过为静态和动态交互控件设置唯一、可预测的 objectName/accessibleName,并新增 AT-SPI 预期名称基线,使 deepin-update-ui 的无障碍名称覆盖率达到 100%,同时补充 REUSE 元数据。

Flow diagram for predictable control naming

flowchart TD
    Static[Static controls] --> ObjectName[setObjectName unique identifier]
    Static --> AccessibleName[setAccessibleName accessibility label]
    Dynamic[Dynamic action buttons] --> EnumName[QMetaEnum action name]
    ObjectName --> ATSPIScan[AT-SPI scan]
    AccessibleName --> ATSPIScan
    EnumName --> ATSPIScan
    ATSPIScan --> Coverage[100% named controls]
Loading

File-Level Changes

Change Details Files
为恢复、系统检查和更新界面的静态控件补充稳定且唯一的 AT-SPI 标识。
  • 为缺少标识的按钮、文本编辑框、进度视图和日志按钮设置 objectName 与 accessibleName。
  • 为跨界面复用的等待视图和进度条使用带场景前缀的唯一 objectName。
  • 为已有交互控件及成功页按钮补充唯一 objectName,避免重复定位。
src/dde-abrecovery/recoverydialog.cpp
src/dde-update/checksystemwidget.cpp
src/dde-update/updatewidget.cpp
为动态创建的操作按钮引入基于 UpdateAction 枚举的可预测命名。
  • 使用 QMetaEnum 将动态操作映射为枚举键名。
  • 为恢复失败及成功页特殊重启/关机按钮设置固定名称。
src/dde-update/checksystemwidget.cpp
src/dde-update/updatewidget.cpp
建立 AT-SPI 名称回归基线并补充项目许可元数据。
  • 新增 expected_names.yaml,覆盖静态控件和 transient 动态控件的预期名称。
  • 新增 REUSE dep5 元数据。
tests/at/spi/expected_names.yaml
.reuse/dep5

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

@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.

@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch 2 times, most recently from f8d95a8 to 2fa234d Compare August 26, 2026 08:08
Add setObjectName for 8 gap widgets and set unique objectName for 4
existing widgets across 3 source files. Per DDE-198, setObjectName is
the test locator anchor; setAccessibleName is retained only for
pre-existing screen-reader semantics, not as a test locator.

为deepin-update-ui中8个缺口控件添加setObjectName,并为4个已有控件
补充唯一objectName。按DDE-198规则,setObjectName为测试定位锚点;
setAccessibleName仅保留既有读屏语义,不作为测试定位锚点。

Log: 补全deepin-update-ui的AT-SPI无障碍名称
Influence: 补全后AT-SPI覆盖率达100%,辅助技术可正确定位所有交互控件。
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from 2fa234d to 2b9d4a6 Compare August 28, 2026 03:42
@MyLeeJiEun
MyLeeJiEun marked this pull request as ready for review September 1, 2026 06:46

@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-bot

deepin-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 1.0.62
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #340

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.

2 participants