Skip to content

fix: add missing AT-SPI accessible names for interactive widgets - #767

Draft
re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:agent/atspi-bot/96473bcffc24
Draft

re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:agent/atspi-bot/96473bcffc24

Conversation

@re2zero

@re2zero re2zero commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

补全 deepin-editor 中缺失的 AT-SPI 无障碍名称(AccessibleName),将覆盖率从 92% 提升至 100%。

Changes

# File Widget AccessibleName Context
1 src/common/settings.cpp:292 QComboBox FontComboBox Settings::createFontComBoBoxHandle
2 src/common/settings.cpp:358 KeySequenceEdit ShortCutLineEdit Settings::createKeySequenceEditHandle
3 src/widgets/ddropdownmenu.cpp:370 DMenu EncodeMenu DDropdownMenu::createEncodeMenu
4 src/widgets/ddropdownmenu.cpp:377 QMenu EncodeGroupMenu DDropdownMenu::createEncodeMenu

Coverage

类型 补全前 补全后
C++ 已编写 46 50
C++ 缺失 4 0
C++ 覆盖率 92.0% 100.0%

Verification

  • 本地编译验证通过(cmake --build build -j$(nproc))
  • 覆盖率扫描验证:50/50 = 100.0%

Scan Commit

  • Base commit: d9eeae03
  • Fix commit: 044ad968

Summary by Sourcery

Enhancements:

  • Add accessible names to the font selector, shortcut editor, encoding menu, and encoding group menus to improve AT-SPI identification.

1. Add setAccessibleName("FontComboBox") for the font combo box in
   Settings::createFontComBoBoxHandle.
2. Add setAccessibleName("ShortCutLineEdit") for the key sequence edit
   in Settings::createKeySequenceEditHandle.
3. Add setAccessibleName("EncodeMenu") for the encoding DMenu in
   DDropdownMenu::createEncodeMenu.
4. Add setAccessibleName("EncodeGroupMenu") for encoding group QMenu
   in DDropdownMenu::createEncodeMenu.

fix: 补全缺失的 AT-SPI 无障碍名称

1. 为 Settings::createFontComBoBoxHandle 中的字体下拉框添加
   setAccessibleName("FontComboBox")。
2. 为 Settings::createKeySequenceEditHandle 中的快捷键编辑框添加
   setAccessibleName("ShortCutLineEdit")。
3. 为 DDropdownMenu::createEncodeMenu 中的编码菜单添加
   setAccessibleName("EncodeMenu")。
4. 为 DDropdownMenu::createEncodeMenu 中的编码分组菜单添加
   setAccessibleName("EncodeGroupMenu")。

Log: 补全 deepin-editor 交互控件的 AT-SPI 无障碍名称,覆盖率从 92% 提升至 100%
Influence:
  1. 验证设置页字体下拉框可通过 AT-SPI 名称定位。
  2. 验证快捷键编辑框可通过 AT-SPI 名称定位。
  3. 验证编码菜单及编码分组菜单可通过 AT-SPI 名称定位。
  4. 本地编译验证通过,覆盖率扫描达 100%。
PMS:
@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

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: re2zero

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 Dec 2, 2026

Copy link
Copy Markdown

Reviewer's Guide

UI

Add accessible names to the font combo box and shortcut editor created by the settings handlers.

  • src/common/settings.cpp L292, L359

Add accessible names to the encoding menu and its group menus.

  • src/widgets/ddropdownmenu.cpp L370, L378-379

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

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.

2 participants