feat: add AT-SPI accessible names for interactive widgets - #339
Conversation
|
Skipping CI for Draft Pull Request. |
Reviewer's GuideExpands AT-SPI coverage by assigning object and accessible names across document-viewer navigation, menus, forms, editing, scaling, and slideshow controls, improving assistive-technology and automated-test discoverability without changing widget behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
0438a50 to
d79f910
Compare
Complete AT-SPI naming for all interactive widgets, reaching 100% coverage. Add the missing setObjectName/setAccessibleName calls to interactive widgets that were only partially named (list views, tree view, context menus, buttons, line edits), improving AT-SPI coverage from 72.1% to 100%. 为全部交互控件补齐 AT-SPI 无障碍名称,覆盖率提升至 100%。 对仅有一半命名(缺少 setObjectName 或 setAccessibleName)的交互控件 (列表视图、目录树、右键菜单、按钮、输入框)补齐缺失的命名调用, AT-SPI 覆盖率从 72.1% 提升至 100%。 Log: 补全文档查看器 AT-SPI 无障碍名称至 100% 覆盖 Influence: 文档查看器 AT-SPI 无障碍覆盖率达到 100%,所有交互控件均可被辅助工具和自动化测试定位。
d79f910 to
4630f67
Compare
|
[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 |
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
📋 Commit 信息
📁 修改文件列表(16个文件)
🔍 详细分析1. 语法逻辑 ✓(25/25分)评价: 语法正确,逻辑清晰 ✓ 分析: 潜在问题: 2. 代码质量 ✓(22/25分)评价: 代码结构清晰,存在轻微命名不一致 ✓ 分析: 潜在问题:
建议: 3. 代码性能 ✓(20/20分)评价: 性能良好,资源使用合理 ✓ 分析: 潜在问题: 4. 代码安全 ✓(30/30分)评价: 存在0个安全漏洞 ✓ 分析:
漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 安全漏洞详情: 💡 改进建议1. 统一命名规范 建议制定统一的 AT-SPI 命名规范文档,明确以下规则:
示例代码(C++/Qt): // ❌ 当前不一致的命名
m_pImageListView->setObjectName("PImageListView_2"); // NotesWidget
m_pImageListView->setObjectName("PImageListView_3"); // SearchResWidget
m_pImageListView->setObjectName("PImageListView_4"); // ThumbnailWidget
m_pFiteHAction->setObjectName("PFiteHaction"); // 小写 action
// ✅ 建议的统一命名
m_pImageListView->setObjectName("NoteImageListView"); // NotesWidget
m_pImageListView->setObjectName("SearchImageListView"); // SearchResWidget
m_pImageListView->setObjectName("ThumbnailImageListView"); // ThumbnailWidget
m_pFiteHAction->setObjectName("FitHAction"); // 统一大写 Action2. 补全遗漏的控件命名 在 📊 评分汇总
ℹ️ 其他信息
本报告由 AI 代码审查工具自动生成 |
|
/merge |
Changes
Add
setObjectName/setAccessibleNamecalls to interactive widgets missing accessibility names.Coverage
AT-SPI coverage improved from 45.5% to 72.7% (remaining gaps are false positives: parent pointers from external code, dead member variables, and already-named widgets detected at usage lines).
Files Changed
reader/MainWindow.cpp— TitleMenu accessible namereader/browser/BrowserMenu.cpp— ColorWidgetAction accessible namereader/uiframe/TitleMenu.cpp— HandleMenu, EyeProtectionAction accessible namesreader/widgets/EncryptionPage.cpp— password edit accessible namereader/widgets/RestoreTipWidget.cpp— buttons accessible namesreader/widgets/ScaleMenu.cpp— menu actions accessible namesreader/widgets/SlidePlayWidget.cpp— slideshow buttons accessible namesreader/widgets/TextEditWidget.cpp— text edit accessible nameLog: 补全文档查看器 AT-SPI 无障碍名称
Influence: 提升文档查看器 AT-SPI 无障碍覆盖率,便于辅助工具和自动化测试定位控件。
Summary by Sourcery
Improve AT-SPI accessibility coverage by naming previously unidentified interactive document-viewer controls.
New Features:
Enhancements:
Chores: