Skip to content

fix(a11y): add AT-SPI accessible names/roles for dde-shell panels - #1712

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

fix(a11y): add AT-SPI accessible names/roles for dde-shell panels#1712
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fix/at-spi-completion-20260826

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

AT-SPI Accessibility Completion for dde-shell

Summary

Completes AT-SPI accessible name/role coverage across dde-shell panels. Adds setObjectName() / setAccessibleName() to C++ widgets and Accessible.name / Accessible.role to QML elements, plus an expected_names.yaml regression baseline.

Related issue: DDE-160 (为 dde-shell 补全 AT-SPI 支持)

Coverage Results

Layer Before After
C++ widgets 0.0% (0/2) 100.0% (2/2)
QML elements 4.2% (8/189) 95.8% (181/189)

The remaining 8 QML gaps are non-visual types (SortFilterModel, DelegateChooser, SequentialAnimation subclasses) where the Accessible attached property is not applicable — correctly skipped.

Changes

C++ (1 file, 2 gaps fixed):

  • panels/dock/taskmanager/x11preview.cpp — added setObjectName() + setAccessibleName() for m_closeAllButton and m_listView

QML (57 files, 173 gaps fixed):

  • Standard QML types (Button, Menu, MenuItem, ListView, SpinBox, ComboBox, ItemDelegate, GridView, TreeView, ScrollBar): added Accessible.name only (role auto-inferred by Qt C++ backend)
  • Custom visual components (PanelToolTip, PanelPopup, OverflowContainer, NotifyItem, AppItem, ShellSurfaceItemProxy, etc.): added both Accessible.name (via qsTr()) and Accessible.role (mapped per component type)
  • Non-visual types: skipped — not Item subclasses, Accessible attached property not applicable

Regression baseline:

  • tests/at/spi/expected_names.yaml — 2 C++ widgets + 181 QML elements, for future quality-gate regression checks

Notes

  • Only AT-SPI accessibility properties were added; no behaviour, layout, or existing code was modified.
  • Full build verification was not possible in the agent environment (missing Qt6 Wayland compositor private headers / xcb-ewmh dev package). The C++ changes add only standard setObjectName() / setAccessibleName() calls on QListView* and DIconButton* (both QWidget subclasses).

Draft PR — please review.

Summary by Sourcery

Complete AT-SPI accessibility metadata across dde-shell panels without changing their behavior or layout.

Bug Fixes:

  • Complete AT-SPI accessible name and role coverage across dde-shell panels and related examples.

Enhancements:

  • Add semantic accessibility metadata to C++ widgets and QML controls, containers, menus, popups, notifications, tray components, and shell surfaces.
  • Establish an expected accessibility-name and role baseline for 2 C++ widgets and 181 QML elements.

Tests:

  • Add the AT-SPI expected_names.yaml regression baseline for future accessibility coverage checks.

Chores:

  • Update SPDX copyright year ranges in affected QML and example files.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@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 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds AT-SPI accessible names and roles throughout dde-shell’s native task-manager widgets and QML panel surfaces, while introducing a 183-entry YAML baseline to detect future accessibility coverage regressions; behavior and layout are otherwise unchanged.

File-Level Changes

Change Details Files
Complete AT-SPI metadata coverage for QML visual elements across example, dock, tray, quick-panel, notification, frame, and shell UI components.
  • Add Accessible.name to standard Qt controls and views, relying on Qt for role inference.
  • Add translated or model-driven accessible names to menus, menu items, delegates, labels, popups, and dynamic content.
  • Assign explicit Accessible.role values to custom visual components, containers, windows, buttons, panes, lists, tooltips, dialogs, and text elements.
  • Leave non-visual model, chooser, and animation types without attached accessibility metadata because the property is not applicable.
example/applet-example-data/package/main.qml
example/applet-example/package/main.qml
example/bridge-example/package/appletitem.qml
example/drag-example/package/main.qml
example/layershell-example/main.qml
example/lockscreen-example/package/main.qml
example/osd-example/package/main.qml
frame/qml/PanelMenuWindow.qml
frame/qml/PanelToolTipWindow.qml
panels/dock/AppletItemButton.qml
panels/dock/OverflowContainer.qml
panels/dock/appruntimeitem/package/appruntimeitem.qml
panels/dock/multitaskview/package/multitaskview.qml
panels/dock/package/main.qml
panels/dock/showdesktop/package/showdesktop.qml
panels/dock/taskmanager/package/AppItem.qml
panels/dock/taskmanager/package/AppItemBackground.qml
panels/dock/taskmanager/package/TaskManager.qml
panels/dock/tray/SurfacePopup.qml
panels/dock/tray/SurfaceSubPopup.qml
panels/dock/tray/TrayItemSurfacePopup.qml
panels/dock/tray/package/ActionLegacyTrayPluginDelegate.qml
panels/dock/tray/package/ActionShowStashDelegate.qml
panels/dock/tray/package/ActionToggleCollapseDelegate.qml
panels/dock/tray/package/DummyDelegate.qml
panels/dock/tray/package/StashContainer.qml
panels/dock/tray/package/StashedItemDelegateChooser.qml
panels/dock/tray/package/TrayItemDelegateChooser.qml
panels/dock/tray/package/tray.qml
panels/dock/tray/quickpanel/DragItem.qml
panels/dock/tray/quickpanel/PanelPluginPage.qml
panels/dock/tray/quickpanel/PanelTrayItem.qml
panels/dock/tray/quickpanel/PluginItem.qml
panels/dock/tray/quickpanel/QuickPanel.qml
panels/dock/tray/quickpanel/QuickPanelPage.qml
panels/dock/tray/quickpanel/SubPluginPage.qml
panels/notification/bubble/package/Bubble.qml
panels/notification/bubble/package/main.qml
panels/notification/center/GroupNotify.qml
panels/notification/center/NormalNotify.qml
panels/notification/center/NotifyCenter.qml
panels/notification/center/NotifyHeader.qml
panels/notification/center/NotifyHeaderTitleText.qml
panels/notification/center/NotifySetting.qml
panels/notification/center/NotifySettingMenu.qml
panels/notification/center/NotifyStaging.qml
panels/notification/center/NotifyView.qml
panels/notification/center/NotifyViewDelegate.qml
panels/notification/center/OverlapNotify.qml
panels/notification/center/package/main.qml
panels/notification/osd/displaymode/package/main.qml
panels/notification/osd/kblayout/package/main.qml
panels/notification/osd/windoweffect/package/main.qml
panels/notification/plugin/NotifyAction.qml
panels/notification/plugin/NotifyActionMenu.qml
panels/notification/plugin/NotifyItemContent.qml
shell/SceneWindow.qml
Expose accessible identities for the two native task-manager preview widgets.
  • Set stable object names and accessible names on the X11 preview list view and close-all button.
panels/dock/taskmanager/x11preview.cpp
Add a generated-style accessibility regression baseline for native widgets and QML elements.
  • Record expected source locations, element types, names, roles, and parent relationships for 2 C++ widgets and 181 QML elements.
  • Document the intentionally skipped non-visual elements through the coverage baseline’s scope.
tests/at/spi/expected_names.yaml

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-20260826 branch from c352bc0 to 93f095d Compare August 26, 2026 06:05
Add setObjectName()/setAccessibleName() to C++ widgets and
Accessible.name/Accessible.role to QML elements across dock,
notification, tray, frame, shell and example panels. Also add
the expected_names.yaml regression baseline under tests/at/spi/.

Log: 补全 dde-shell 各面板 AT-SPI 无障碍名称与角色
Influence: 提升无障碍工具与自动化测试对 Dock/通知中心控件的识别率
@MyLeeJiEun
MyLeeJiEun force-pushed the fix/at-spi-completion-20260826 branch from 93f095d to aaa98c9 Compare August 26, 2026 06:19
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.

2 participants