Skip to content

feat: 补全 AT-SPI 无障碍名称 - #338

Draft
re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:fix/at-spi-completion-20260826
Draft

feat: 补全 AT-SPI 无障碍名称#338
re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:fix/at-spi-completion-20260826

Conversation

@re2zero

@re2zero re2zero commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

概述

为缺失无障碍名称的交互控件添加 setObjectName/setAccessibleName 调用,提升 AT-SPI 覆盖率。

覆盖率对比

指标 补全前 补全后
总控件数 44 44
已命名 20 32
缺失 24 12
覆盖率 45.5% 72.7%

修改文件 (8 files, +23 lines)

  • reader/MainWindow.cpp
  • reader/browser/BrowserMenu.cpp
  • reader/uiframe/TitleMenu.cpp
  • reader/widgets/EncryptionPage.cpp
  • reader/widgets/RestoreTipWidget.cpp
  • reader/widgets/ScaleMenu.cpp
  • reader/widgets/SlidePlayWidget.cpp
  • reader/widgets/TextEditWidget.cpp

验证

  • 本地编译通过(cmake + make 100%)
  • 补全后重新扫描验证覆盖率提升

Summary by Sourcery

Complete AT-SPI naming for interactive reader controls to improve accessibility coverage.

New Features:

  • Add object and accessibility names to previously unnamed menus, actions, buttons, password fields, and text-edit controls to improve AT-SPI discoverability.

Enhancements:

  • Improve accessibility-name coverage across the reader interface.

Add setObjectName/setAccessibleName calls to interactive widgets
missing accessibility names, improving AT-SPI coverage from 45.5% to 72.7%.

为缺失无障碍名称的交互控件添加 setObjectName/setAccessibleName 调用,
AT-SPI 覆盖率从 45.5% 提升至 72.7%。

Log: 补全文档查看器 AT-SPI 无障碍名称
Influence: 提升文档查看器 AT-SPI 无障碍覆盖率,便于辅助工具和自动化测试定位控件。
@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 Aug 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

本 PR 在 8 个界面和菜单实现中为缺失命名的交互控件补充 Qt objectName,并为主要输入框和按钮同步设置 accessibleName,以提升 AT-SPI 识别与覆盖率;验证显示命名覆盖率由 45.5% 提升至 72.7%,且本地构建通过。

File-Level Changes

Change Details Files
为菜单、动作及交互控件补充 Qt 对象名和无障碍名称,扩大 AT-SPI 可识别控件范围。
  • 为主菜单、标题菜单子菜单及菜单动作设置稳定的 objectName。
  • 为密码输入框、恢复提示按钮、幻灯片播放按钮和文本编辑框同时设置 objectName 与 accessibleName。
  • 为缩放菜单动作补充 objectName,覆盖页面、宽度、高度等缩放选项。
reader/MainWindow.cpp
reader/browser/BrowserMenu.cpp
reader/uiframe/TitleMenu.cpp
reader/widgets/EncryptionPage.cpp
reader/widgets/RestoreTipWidget.cpp
reader/widgets/ScaleMenu.cpp
reader/widgets/SlidePlayWidget.cpp
reader/widgets/TextEditWidget.cpp
通过重新扫描验证无障碍命名覆盖率提升。
  • 已命名控件从 20 个增至 32 个,覆盖率从 45.5% 提升至 72.7%。
  • 本地 CMake/Make 编译通过。
reader/MainWindow.cpp
reader/browser/BrowserMenu.cpp
reader/uiframe/TitleMenu.cpp
reader/widgets/EncryptionPage.cpp
reader/widgets/RestoreTipWidget.cpp
reader/widgets/ScaleMenu.cpp
reader/widgets/SlidePlayWidget.cpp
reader/widgets/TextEditWidget.cpp

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