Skip to content

fix: add AccessibleName for AT-SPI accessibility controls - #555

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
dengzhongyuan365-dev:agent/atspi-bot/a7c1df2ce9c9
Nov 13, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
dengzhongyuan365-dev:agent/atspi-bot/a7c1df2ce9c9

Conversation

@dengzhongyuan365-dev

@dengzhongyuan365-dev dengzhongyuan365-dev commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Add setAccessibleName() to 31 interactive controls across 10 source files to improve AT-SPI accessibility coverage for the archive manager (归档管理器).

Changes by file

File Controls
compresssettingpage.cpp FileNameEdit, SavePathEdit, CompressLevelComboBox, AdvancedOptionsSwitch, PasswordEdit, CpuThreadComboBox, ListEncryptionSwitch, SplitCheckBox, SplitValueEdit, CommentEdit, CompressButton (11)
compresspage.cpp NextButton (1)
uncompresspage.cpp ExtractPathButton, ExtractButton (2)
homepage.cpp SelectFileButton (1)
progresspage.cpp ProgressBar, CancelButton, PauseContinueButton (3)
successpage.cpp ViewFileButton, BackButton (2)
failurepage.cpp RetryButton, BackButton (2)
popupdialog.cpp ZipRadioButton, SevenZRadioButton, UsePasswordCheckBox, PasswordEdit, RenameEdit (5)
settingdialog.cpp SelectAllButton, ClearAllButton, RecommendedButton (3)
progressdialog.cpp ProgressDialogBar (1)

Build verification

  • cmake .. -DCMAKE_BUILD_TYPE=Debug ✅
  • make -j$(nproc) deepin-compressor ✅ (100% built, no errors)

Related issue

V-8391: AT-补充-归档管理器

Summary by Sourcery

Improve archive manager accessibility by identifying interactive controls for assistive technologies.

New Features:

  • Add explicit accessible names to interactive controls across archive compression, extraction, progress, result, settings, and dialog workflows to improve AT-SPI accessibility coverage.

Chores:

  • Update copyright years in the modified source files.

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

UI

Name the compression-page controls and the inputs and options on the compression-settings page for AT-SPI access.

  • src/source/page/compresspage.cpp L1, L80
  • src/source/page/compresssettingpage.cpp L1, L304-316

Name the extraction path and action controls for AT-SPI access.

  • src/source/page/uncompresspage.cpp L1, L120-122

Name the file-selection control on the home page for AT-SPI access.

  • src/source/page/homepage.cpp L1, L47

Name the progress bar and pause, continue, and cancel controls for AT-SPI access.

  • src/source/page/progresspage.cpp L1, L227-230

Name the back and view-file controls on the success page for AT-SPI access.

  • src/source/page/successpage.cpp L1, L86-88

Name the retry and back controls on the failure page for AT-SPI access.

  • src/source/page/failurepage.cpp L1, L103-105

Name the archive-format radio buttons, password controls, and rename field in the dialogs for AT-SPI access.

  • src/source/dialog/popupdialog.cpp L353-356 (+4 small edits)

Name the selection and recommendation controls in the settings dialog for AT-SPI access.

  • src/source/dialog/settingdialog.cpp L1, L133-137

Name the progress dialog bar for AT-SPI access.

  • src/source/dialog/progressdialog.cpp L1, L62

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

@dengzhongyuan365-dev
dengzhongyuan365-dev force-pushed the agent/atspi-bot/a7c1df2ce9c9 branch from d80da30 to 5d04020 Compare November 13, 2026 08:39
@dengzhongyuan365-dev
dengzhongyuan365-dev marked this pull request as ready for review November 13, 2026 08:50

@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 found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/source/page/compresssettingpage.cpp" line_range="305-316" />
<code_context>
     m_pCompressBtn->setMinimumWidth(340);    // 设置压缩按钮最小尺寸

+    // 设置无障碍名称
+    m_pFileNameEdt->setAccessibleName("FileNameEdit");
+    m_pSavePathEdt->setAccessibleName("SavePathEdit");
+    m_pCompressLevelCmb->setAccessibleName("CompressLevelComboBox");
+    m_pAdvancedBtn->setAccessibleName("AdvancedOptionsSwitch");
+    m_pPasswordEdt->setAccessibleName("PasswordEdit");
+    m_pCpuCmb->setAccessibleName("CpuThreadComboBox");
+    m_pListEncryptionBtn->setAccessibleName("ListEncryptionSwitch");
+    m_pSplitCkb->setAccessibleName("SplitCheckBox");
+    m_pSplitValueEdt->setAccessibleName("SplitValueEdit");
+    m_pCommentEdt->setAccessibleName("CommentEdit");
+    m_pCompressBtn->setAccessibleName("CompressButton");
+
     // 左侧布局
     QHBoxLayout *pTypeLayout = new QHBoxLayout; // 类型布局
</code_context>
<issue_to_address>
**Screen readers announce internal identifiers**

When assistive technology reads one of the newly named controls, qt exposes these explicit accessible names to AT-SPI instead of the controls’ visible text, so screen readers announce code-like strings such as “CompressButton” or “CancelButton” rather than useful, localized labels. Users relying on assistive technology cannot readily identify the controls.

Use translated, user-facing accessible names (or leave the accessible name unset when the visible text is already suitable), and keep stable automation identifiers separate from the accessible name.

Also at `src/source/page/compresspage.cpp:80`, `src/source/page/uncompresspage.cpp:120-121`, `src/source/page/homepage.cpp:47`, `src/source/page/progresspage.cpp:227-229`, `src/source/page/successpage.cpp:86-87`, `src/source/page/failurepage.cpp:103-104`, `src/source/dialog/popupdialog.cpp:353-356`, `src/source/dialog/settingdialog.cpp:133-137`, `src/source/dialog/progressdialog.cpp:62`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread src/source/page/compresssettingpage.cpp Resolved
@dengzhongyuan365-dev
dengzhongyuan365-dev force-pushed the agent/atspi-bot/a7c1df2ce9c9 branch from 5d04020 to 434f5e9 Compare November 13, 2026 08:55
1. Add setAccessibleName() to 31 interactive controls across 10 files.
2. Cover compression, extraction, progress, result and settings pages.
3. Name radio buttons, input fields, switches, combos and buttons.

Log: Add accessible names for AT-SPI automation support

Influence:
1. Launch the app and verify all interactive controls render and respond.
2. Run AT-SPI inspection and confirm 31 controls expose accessible names.
3. Verify compression and extraction flows remain unaffected.

fix: 为交互控件补充 AT-SPI 无障碍名称

1. 为 10 个文件中的 31 个交互控件增加 setAccessibleName()。
2. 覆盖压缩、解压、进度、结果及设置等页面。
3. 包含单选框、输入框、开关、下拉框和按钮等控件。

Influence:
1. 启动应用,验证各交互控件显示与交互正常。
2. 使用 AT-SPI 检查工具确认 31 个控件均可获取无障碍名称。
3. 验证压缩、解压等既有流程不受影响。

Log: 补充 AT-SPI 自动化测试所需的控件无障碍名称
PMS: TASK-398535
multica: V-8391
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

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

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交为 deepin-compressor 项目中的 10 个文件添加 AT-SPI 无障碍名称(AccessibleName),变更内容简单明确,仅调用 QWidget::setAccessibleName() 设置控件的无障碍标识并更新版权年份。四维度均无问题,无安全漏洞,OCR 审查也未发现问题。

🔍 详细分析

1. 语法逻辑 ✅

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

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

建议: []


2. 代码质量 ✅

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

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

建议: []


3. 代码性能 ✅

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

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

建议: []


4. 代码安全 🔒

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

🔐 发现 0 个安全漏洞

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

建议: []


💡 改进建议代码示例


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

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dengzhongyuan365-dev, lzwind

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

@dengzhongyuan365-dev

Copy link
Copy Markdown
Member Author

/merge

@deepin-bot
deepin-bot Bot merged commit 72050d2 into linuxdeepin:master Nov 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants