fix: add AT-SPI accessible names for UI widgets - #222
Conversation
Reviewer's GuideAdds AT-SPI friendly accessible names to key UI widgets and actions, replacing ad-hoc object names with a centralized helper, and introduces a test baseline to validate the accessible naming scheme. Sequence diagram for setting AT-SPI accessible names via setWgtAccesibleNamesequenceDiagram
participant BlurWidget
participant AccessibleHelper
BlurWidget->>AccessibleHelper: setWgtAccesibleName(BlurWidget, BlurWidget)
AccessibleHelper-->>BlurWidget: [accessible name configured]
participant ColorPanel
ColorPanel->>AccessibleHelper: setWgtAccesibleName(m_alphaControlWidget, CAlphaControlWidget)
ColorPanel->>AccessibleHelper: setWgtAccesibleName(m_colLineEdit, ColorLineEdit)
participant PickColorWidget
PickColorWidget->>AccessibleHelper: setWgtAccesibleName(m_colorSlider, ColorSlider)
PickColorWidget->>AccessibleHelper: setWgtAccesibleName(m_colorLabel, ColorLabel)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Skipping CI for Draft Pull Request. |
4956a9e to
8239579
Compare
0585d51 to
25ea735
Compare
初验结果审查结论:需修改后重验问题: 以下 6 个文件新增了不必要的
原因: 其他项目:
建议: 移除非必要的 include 后推送更新,再申请重新验证。 |
Add setAccessibleName/setObjectName calls for widgets that were missing accessibility identifiers. - Add instance-level names for child controls in PickColorWidget, ColorPanel, BlurWidget, CAlphaControlWidget, CAttributeItemWidget, CCutWidget, CExportImageDialog, CGraphicsTextItem, CMultipTabBar - Add class-level accessible names for ColorLabel, ColorSlider, CSpinBox, CTextEdit, MessageDlg, ProgressDialog, CSideWidthWidget - Fix Width Label naming to camelCase WidthLabel - Add expected_names.yaml AT-SPI baseline - Update copyright years to 2026 - Remove unused includes of drawshape/globaldefine.h Log: 添加AT-SPI可访问名称支持 Influence: 可交互控件可通过AT-SPI识别,提升辅助功能和自动化测试支持。
25ea735 to
a99e490
Compare
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 diff --git a/src/frame/AttributesWidgets/private/pickcolorwidget.cpp b/src/frame/AttributesWidgets/private/pickcolorwidget.cpp
index 72c56d2a2..123456789 100644
--- a/src/frame/AttributesWidgets/private/pickcolorwidget.cpp
+++ b/src/frame/AttributesWidgets/private/pickcolorwidget.cpp
@@ -51,7 +51,8 @@ PickColorWidget::PickColorWidget(DWidget *parent)
m_redEditLabel = new EditLabel(this);
m_redEditLabel->setObjectName("RedEditLabel");
- m_redEditLabel->setAccessibleName("RedEditLabel");
+ // 保持 objectName 为英文以兼容 expected_names.yaml 自动化测试,AccessibleName 支持国际化朗读
+ m_redEditLabel->setAccessibleName(tr("Red color edit"));
m_greenEditLabel = new EditLabel(this);
m_greenEditLabel->setObjectName("GreenEditLabel"); |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, re2zero The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
Summary
Add AT-SPI accessible names for UI widgets across the application to improve accessibility support and enable automated testing via AT-SPI frameworks.
Changes
setWgtAccesibleNamefor: CMenu, ColorLabel, ColorSlider, CSpinBox, CTextEdit, ToolButton, EditLabel, MessageDlg, ProgressDialogsetObjectNametosetWgtAccesibleNamefor proper AT-SPI supportexpected_names.yamlAT baselineRelated
Summary by Sourcery
Add consistent AT-SPI accessible names and identifiers across widgets, menus, actions, and dialogs, and introduce a test baseline to support accessibility tooling and automated UI testing.
New Features:
Enhancements:
Documentation:
Tests: