Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions reader/eyeprotection/EyeProtectionAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ void EyeProtectionAction::initWidget(DWidget *parent)
auto btn = new RoundColorWidget(color, pWidget);
btn->setAllClickNotify(true);
btn->setObjectName(QString("eye_%1").arg(i));
// AT 自动化依赖 AccessibleName 定位(objectName 不进入 AT-SPI name);
// 取与 objectName 一致的稳定标识,避免随语言/翻译变化破坏用例选择器
btn->setAccessibleName(QString("eye_%1").arg(i));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Screen readers announce machine IDs

When a user navigates these controls with a screen reader, screen readers use the explicit accessible name instead of a meaningful mode label, so users hear identifiers such as “eye_0” rather than which eye-protection mode the color represents.

Use a localized, descriptive accessible name for each mode and expose the stable automation identifier through a separate selector mechanism.

Prompt for AI agents
In `reader/eyeprotection/EyeProtectionAction.cpp` at line 67:

**Screen readers announce machine IDs**

When a user navigates these controls with a screen reader, screen readers use the explicit accessible name instead of a meaningful mode label, so users hear identifiers such as “eye_0” rather than which eye-protection mode the color represents.

Use a localized, descriptive accessible name for each mode and expose the stable automation identifier through a separate selector mechanism.

btn->setFixedSize(QSize(25, 25));
btn->setToolTip(QCoreApplication::translate("EyeProtection", s_modeNames[i]));
btn->setSelected(static_cast<int>(curMode) == i);
Expand Down