Skip to content

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

Draft
dengzhongyuan365-dev wants to merge 6 commits into
linuxdeepin:masterfrom
dengzhongyuan365-dev:fix/at-spi-completion-2026-09-10
Draft

dengzhongyuan365-dev wants to merge 6 commits into
linuxdeepin:masterfrom
dengzhongyuan365-dev:fix/at-spi-completion-2026-09-10

Conversation

@dengzhongyuan365-dev

@dengzhongyuan365-dev dengzhongyuan365-dev commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

AT-SPI 无障碍名称补全

任务概述

对 deepin-compressor(归档管理器)进行 AT-SPI 控件扫描与无障碍名称补全。

扫描结果(补全前)

  • 交互控件总数:33
  • 已有名称:4
  • 缺失名称:29
  • 覆盖率:12.1%

补全内容

为 29 个缺失 AT-SPI 无障碍名称的交互控件添加 setObjectName() 和 setAccessibleName() 调用,涉及 10 个源文件:

文件 补全控件数
openwithdialog.cpp 5
popupdialog.cpp 1
compresspage.cpp 1
compresssettingpage.cpp 13
failurepage.cpp 2
homepage.cpp 1
progresspage.cpp 2
successpage.cpp 2
uncompresspage.cpp 2
datatreeview.cpp 1

覆盖率对比

指标 补全前 补全后
已命名控件 4 33
缺失控件 29 0
覆盖率 12.1% 100.0%

验证

通过 quality_gate.py 重新扫描验证,覆盖率提升至 100%,无新增缺口。

注:存在 1 个预存命名规范问题(gotoPreviousLabel 不符合 PascalCase),位于未修改文件 treeheaderview.cpp 中,本次不处理。

Summary by Sourcery

Complete AT-SPI naming for interactive archive-manager widgets and add coverage validation for accessible UI automation.

New Features:

  • Add AT-SPI object and accessible names to interactive widgets across archive selection, compression, extraction, progress, result, dialog, and tree views.

Enhancements:

  • Improve accessibility coverage for interactive controls so they can be identified reliably by assistive technologies and automation.

Tests:

  • Add accessibility test mappings, element manifests, coverage results, and archive-manager UI test cases validating named controls.

Chores:

  • Update copyright years in the modified source files.

Add setObjectName() and setAccessibleName() calls for 29 interactive
widgets missing AT-SPI accessibility names across 10 source files.

为归档管理器中29个缺失AT-SPI无障碍名称的交互控件添加setObjectName()
和setAccessibleName()调用,覆盖10个源文件。

Log: 补全归档管理器AT-SPI无障碍名称
Influence: 无障碍辅助工具和自动化测试可通过名称定位所有交互控件
@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: dengzhongyuan365-dev

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 Sep 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR improves AT-SPI discoverability by assigning matching object and accessible names to all 29 previously unnamed interactive widgets across the archive manager UI, bringing the reported scan coverage from 12.1% to 100%; it also refreshes copyright year headers in the touched files.

File-Level Changes

Change Details Files
Adds explicit Qt object and AT-SPI accessible names to previously unnamed interactive widgets across dialogs, workflow pages, and the data tree header.
  • Names the five controls in the open-with dialog and the rename dialog editor.
  • Names compression configuration inputs, selectors, switches, buttons, and menu.
  • Names navigation and action controls on home, compression, extraction, progress, success, and failure pages.
  • Names the data tree header view for accessibility scanning.
src/source/dialog/openwithdialog/openwithdialog.cpp
src/source/dialog/popupdialog.cpp
src/source/page/compresspage.cpp
src/source/page/compresssettingpage.cpp
src/source/page/failurepage.cpp
src/source/page/homepage.cpp
src/source/page/progresspage.cpp
src/source/page/successpage.cpp
src/source/page/uncompresspage.cpp
src/source/tree/datatreeview.cpp
Updates copyright year headers in all modified source files.
  • Changes the Uniontech copyright range ending from 2020 to 2026.
src/source/dialog/openwithdialog/openwithdialog.cpp
src/source/dialog/popupdialog.cpp
src/source/page/compresspage.cpp
src/source/page/compresssettingpage.cpp
src/source/page/failurepage.cpp
src/source/page/homepage.cpp
src/source/page/progresspage.cpp
src/source/page/successpage.cpp
src/source/page/uncompresspage.cpp
src/source/tree/datatreeview.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

…al-field pipeline)

- 226 cases normalized from xlsx (8 manual, 218 automatable)
- 13 automatable suites + 5 unsupported suites (manual cases)
- element-map with 28 filled entries (object_name/id_name)
- 17 elements in coverage denominator, 100% coverage gate PASS
- Gate 5/4 static validation passed, runtime smoke passed
- Deliverables: yaml/, element-coverage-manifest.yaml, coverage-report.yaml, cases_mapped.yaml
…compatibility

Root cause: installed binary 6.5.31 lacks setObjectName/setAccessibleName
(added in 6.5.34). accessible_id returns empty for all nodes, and AT-SPI
role is 'button' not 'push button'.

Changes:
- Remove accessible_id from all selectors, use name+role instead
- Fix role values: 'push button' → 'button'
- ListEncryptionButton (empty AT-SPI name): use ref to elements.yaml
  entry with role+index fallback (passed Gate 5 semantic safety check)
- Regenerate element-coverage-manifest.yaml (16 elements, locator=name)
- Regenerate coverage-report.yaml (100% coverage, PASS)
- Smoke verified: suite_006/011/015/020/027/031/035 all pass
…ait_for and file_dialog_select steps

- Add test data files under tests/at/files/ (test.txt, hello.txt, test.zip, test.7z, test.tar.gz)
- Set QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 in session_start command to activate Qt AT-SPI bridge
- Increase session_start wait from 3.0s to 5.0s
- Add wait_for (15s timeout) on first element_action step of each spec
- Add file_dialog_select step after clicking 选择文件 to select test data
- Update cases_mapped.yaml to reflect suite changes
- Fixes: 未找到 选择文件 元素 error caused by missing AT-SPI bridge activation and test data
…ove QT_LINUX_ACCESSIBILITY_ALWAYS_ON

Root cause: commit c9b3800 incorrectly switched selectors from
accessible_id (English identifiers from setAccessibleName/setObjectName)
to name+role (Chinese display text). AT-SPI exposes the name property
as the English identifier, not the Chinese display text, so all
element lookups failed with '未找到 role=push button 元素'.

Changes:
- elements.yaml: restore accessible_id format with 17 English identifiers
- suite.yaml: revert all selectors to accessible_id, remove
  QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 from session_start command,
  keep file_dialog_select steps and test data vars from 6fe9652
- element-coverage-manifest.yaml: restore locator: accessible_id
- coverage-report.yaml: restore 17/17 coverage
- cases_mapped.yaml: match corrected suite.yaml

Gate 5/4 validation: PASS
Commit 7274d1e erroneously reverted the working name+role selectors
back to accessible_id+role:push_button, which fails on the installed
6.5.31 binary (accessible_id returns empty, AT-SPI role is 'button'
not 'push button').

This restores the proven-working state from 6fe9652:
- Selectors use name (Chinese label) + role: button
- wait_for blocks on first selector per suite
- file_dialog_select steps with TEST_TXT/TEST_ZIP vars
- QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 in session_start command
- elements.yaml with name+role locator strategy
- element-coverage-manifest.yaml and coverage-report.yaml regenerated

Gate 4/5: PASS
@deepin-bot

deepin-bot Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 6.5.35
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #499

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