Skip to content

fix(at-spi): add accessible names for clipboard widgets - #280

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

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

Summary

为 dde-clipboard 补全 AT-SPI accessibleName 支持,使剪贴板控件可被屏幕阅读器正确识别。

Changes

为以下控件添加 setObjectName 和 setAccessibleName 调用:

  • clipboardmodel.cpp — m_list (列表)
  • mainwindow.cpp — m_listview (列表视图)
  • mainwindow.cpp — m_placeholderIcon (占位图标)
  • tipswidget.cpp — m_tipsCloseButton (关闭按钮)

Coverage

指标 补全前 补全后
控件总数 4 4
已命名控件 0 4
覆盖率 0% 100%

Test

  • libclang AST 质量门检查通过:4/4 控件已命名,0 个新缺口
  • 新增 tests/at/spi/expected_names.yaml 记录预期控件名称

Log: 补全AT-SPI accessible name支持
Influence: 提升AT-SPI无障碍辅助覆盖率,剪贴板控件可被屏幕阅读器正确识别。

Summary by Sourcery

Improve AT-SPI accessibility coverage by assigning stable names to interactive clipboard widgets and documenting their expected identifiers.

New Features:

  • Add stable accessibility identifiers for clipboard widgets across the main clipboard UI and Dock integration.

Bug Fixes:

  • Improve screen-reader recognition of interactive clipboard controls through consistent AT-SPI naming.

Enhancements:

  • Expand accessible widget coverage to clipboard item controls, placeholder and close buttons, Dock icons, quick panels, and transient notifications.

Tests:

  • Add an AT-SPI expected-names specification for accessibility identifier coverage and widget classification.

Chores:

  • Register licensing metadata for the new AT-SPI expectations file and update copyright years in affected Dock plugin files.

@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

Adds stable Qt object names across clipboard and related dock widgets so AT-SPI consumers and screen readers can identify controls, with YAML-based coverage expectations, licensing registration, and updated dock-plugin copyright ranges.

Flow diagram for clipboard AT-SPI widget identification

flowchart LR
    ClipboardWidgets[Clipboard and dock widgets] --> SetObjectName[setObjectName]
    SetObjectName --> QtAccessibility[Qt accessibility bridge]
    QtAccessibility --> ATSPI[AT-SPI consumers]
    ATSPI --> ScreenReader[Screen reader]
    ExpectedNames[expected_names.yaml] --> CoverageCheck[AST coverage check]
    SetObjectName --> CoverageCheck
Loading

File-Level Changes

Change Details Files
Add stable Qt object names to clipboard application, item, and dock/quick-panel widgets for AT-SPI identification.
  • Name the main clipboard list, clear action, placeholder icon, and tips close button.
  • Name item close controls and the related dock and quick-panel icons/widgets.
  • Track expected identifiers and coverage metadata in the AT-SPI fixture.
dde-clipboard/itemwidget.cpp
dde-clipboard/mainwindow.cpp
dde-clipboard/tipswidget.cpp
dde-clipboard/messagemanager.cpp
dock-clipboard-plugin/clipboarditem.cpp
dock-clipboard-plugin/quickpanelwidget.cpp
dock-clipboard-plugin/widget/singlequickpanel.cpp
tests/at/spi/expected_names.yaml
Register the new accessibility expectation data under REUSE licensing metadata.
  • Add CC0-1.0 annotation coverage for the expected-names YAML file.
REUSE.toml
Update copyright ranges in modified dock plugin sources.
  • Extend copyright years through 2026.
dock-clipboard-plugin/clipboarditem.cpp
dock-clipboard-plugin/quickpanelwidget.cpp
dock-clipboard-plugin/widget/singlequickpanel.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

@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch 3 times, most recently from 12aa63f to cee9123 Compare August 28, 2026 05:23
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from cee9123 to 491a95d Compare September 1, 2026 06:46
@MyLeeJiEun
MyLeeJiEun marked this pull request as ready for review September 1, 2026 06:47

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

@github-actions

github-actions Bot commented Sep 1, 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 from 62c5ec2 to a007372 Compare September 4, 2026 06:10
Per DDE-198, setObjectName() is the AT-SPI positioning anchor (AccessibleId);
setAccessibleName() retains screen-reader semantics only and is no longer a
coverage gate.

- Add setObjectName anchors: Listview/ClearButton/PlaceholderIcon (mainwindow),
  TipsCloseButton (tipswidget), ItemCloseButton (itemwidget),
  CopiedMessage (messagemanager), ClipboardDockIcon/QuickPanelWidget/
  ClipboardQuickPanelIcon (dock-clipboard-plugin).
- Make ItemWidget objectName unique per instance via a static counter so each
  clipboard item gets a distinct AT-SPI identifier instead of all sharing
  "ItemWidget".
- Add tests/at/spi/expected_names.yaml fixture + REUSE.toml annotation.

Log: 补全AT-SPI accessible name支持
Influence: 提升AT-SPI无障碍辅助覆盖率,剪贴板控件可被屏幕阅读器正确识别。
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-2026-08-24 branch from a007372 to 57a84bd Compare September 4, 2026 06:28
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit 75dec4d into linuxdeepin:master Sep 4, 2026
12 of 13 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