Skip to content

feat: Add AT-SPI accessible names for UI components - #208

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

feat: Add AT-SPI accessible names for UI components#208
re2zero wants to merge 1 commit into
linuxdeepin:masterfrom
re2zero:fix/at-spi-completion-20260806

Conversation

@re2zero

@re2zero re2zero commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Add setAccessibleName() calls to all major UI components in deepin-font-manager to improve accessibility support for AT-SPI testing frameworks.

Changes

  • DFontMgrMainWindow: Accessible names for title bar, sidebar, preview list, state bar, search, font size slider, and related widgets
  • DFontBaseDialog: Accessible names for title bar components (logo, close button, title text)
  • DFontInfoDialog: Accessible names for content frame, font file name label, scroll area
  • DFontInfoScrollArea: Accessible name for basic info label
  • DFDeleteDialog/DFHandleTTCDialog: Accessible names for dialog and buttons
  • DFInstallNormalWindow: Accessible names for progress step, current font label, progress bar
  • DFQuickInstallWindow: Accessible names for title, font type combo, preview, state label, install button
  • DFInstallErrorDialog: Accessible names for dialog and error list view
  • DFontSpinnerWidget: Accessible names for spinner animation and label
  • expected_names.yaml: New AT-SPI expected names verification file

Copyright years updated to 2026 for modified files.

Verification

  • Build: CMake compilation successful (warnings are pre-existing)
  • 10 files changed, 230 insertions(+), 9 deletions(-)

Summary by Sourcery

Add accessible names across major deepin-font-manager windows and dialogs to improve AT-SPI-based accessibility and automated testing.

Enhancements:

  • Define consistent accessibleName values for primary widgets in the main font manager window, quick install window, normal install window, font info dialog, delete/handle TTC dialogs, install error dialog, and spinner widget.
  • Introduce an expected_names.yaml file under tests/at-spi to document and validate AT-SPI accessible names for the application.

Tests:

  • Add AT-SPI expected accessible names test data in tests/at-spi/expected_names.yaml for automated accessibility verification.

Chores:

  • Update copyright years to 2026 in modified source files.

Add setAccessibleName() calls to all major UI components including
main window, dialogs, and widgets to improve accessibility support
for AT-SPI testing frameworks.

Key changes:
- DFontMgrMainWindow: Add accessible names for title bar, sidebar,
  preview list, state bar, search, and slider widgets
- DFontBaseDialog: Add accessible names for title bar, logo icon,
  close button, and title text
- DFontInfoDialog: Add accessible names for content frame, file name
  label, and scroll area
- DFDeleteDialog/DFHandleTTCDialog: Add accessible names for dialog
  and button widgets
- DFInstallNormalWindow: Add accessible names for progress labels
  and progress bar
- DFQuickInstallWindow: Add accessible names for title, font type,
  preview, state label, and action button
- DFInstallErrorDialog: Add accessible names for dialog and list view
- DFontSpinnerWidget: Add accessible names for spinner and label
- tests/at-spi/expected_names.yaml: New file documenting all AT-SPI
  accessible names for verification

Update copyright years to 2026 for modified files.
@sourcery-ai

sourcery-ai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds AT-SPI accessible names to major deepin-font-manager UI components and introduces a YAML expectations file to validate them, alongside copyright year updates.

Flow diagram for AT-SPI accessible name validation using expected_names.yaml

flowchart LR
    TestRunner[AT-SPI test runner] -->|loads| ExpectedNames[expected_names.yaml]
    TestRunner -->|launches| FontManagerApp[deepin-font-manager]
    FontManagerApp -->|creates| UIComponents[UI widgets with setAccessibleName]
    AT_SPI[AT-SPI framework] -->|queries names from| UIComponents
    TestRunner -->|compares queried names to| ExpectedNames
    ExpectedNames -->|pass/fail result| TestRunner
Loading

File-Level Changes

Change Details Files
Add accessible names to main font manager window layout and controls for AT-SPI.
  • Set an accessible name on the main window instance.
  • Assign accessible names to title bar action area and add-font button.
  • Add accessible name to search bar edit field.
  • Tag splitter, left/right holders, and font preview container widgets with accessible names.
  • Add accessible names to font preview list, empty-state list views, and font loading spinner widget.
  • Assign accessible names to state bar container, preview text input, font size slider, and font size label.
deepin-font-manager/views/dfontmgrmainwindow.cpp
Define accessible names for quick install window elements.
  • Set accessible name on the quick install window.
  • Add accessible names to title label, font type combo box, and font preview widget.
  • Assign accessible names to state label and main action (install) button.
deepin-font-manager/views/dfquickinstallwindow.cpp
Define accessible names for delete and TTC handling dialogs and their key controls.
  • Set accessible name on delete confirmation dialog and its message detail label.
  • Set accessible name on TTC handling dialog.
  • Assign accessible names to TTC cancel and confirm buttons.
deepin-font-manager/views/dfdeletedialog.cpp
Add accessible names for base dialog title bar components.
  • Set accessible name on the dialog title bar container.
  • Assign accessible names to logo icon label, close button, and title text label.
deepin-font-manager/interfaces/dfontbasedialog.cpp
Add accessible names to normal install dialog progress UI.
  • Set accessible name on the normal install window.
  • Assign accessible names to progress step label, current font label, and progress bar.
deepin-font-manager/views/dfinstallnormalwindow.cpp
Add accessible names to font info dialog layout and scrollable area.
  • Set accessible name on font info main frame container.
  • Assign accessible name to font file name label.
  • Set accessible name on font info scroll area.
deepin-font-manager/views/dfontinfodialog.cpp
Add accessible names to install error dialog and error list view.
  • Set accessible name on install error dialog.
  • Assign accessible name to install error list view.
deepin-font-manager/views/dfinstallerrordialog.cpp
Add accessible names to font loading spinner widget components.
  • Assign accessible name to font spinner animation widget.
  • Set accessible name on font loading status label.
deepin-font-manager/views/dfontspinnerwidget.cpp
Add accessible name to basic info label in font info scroll area.
  • Assign accessible name to the basic info label inside the font info scroll area.
deepin-font-manager/views/dfontinfoscrollarea.cpp
Introduce AT-SPI expected accessible names YAML for automated verification.
  • Create expected_names.yaml with application metadata and window/component accessible name expectations.
  • Map each UI component’s accessible name to its type, role, and description where appropriate.
  • Include shared base dialog component definitions for title bar, logo icon, title text, and close button.
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

@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

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