AT-SPI: an invalid node has no "invalid-entry" state

未关闭 适合新手
#858 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
accessibility

调研方向

阅读 adapters/atspi-common/src/node.rs 中的 NodeWrapper::state,检查 Node::is_required() 和相关状态映射的工作方式。然后找到 accesskit_consumer API,以公开节点的无效值。完成标准是:具有任意 Invalid 值的节点都包含 AT-SPI 的 State::InvalidEntry;通过使用 Accerciser 或 atspi 按复现步骤操作来验证。

由索引模型根据 Issue 内容生成。

描述

Platform: Linux (AT-SPI, accesskit_atspi_common)

What happens: a node with invalid set (for example a required text input whose value doesn't validate, aria-invalid="true") reaches AT-SPI without the invalid-entry state, so Orca doesn't say "invalid entry" when the field gets focus.

Expected: StateSet includes State::InvalidEntry whenever the node's invalid is set (any Invalid value). Chromium does the same: it maps aria-invalid to ATK_STATE_INVALID_ENTRY.

Reproduce: set node.set_invalid(Invalid::True) on a text input and read its states with Accerciser or atspi. invalid-entry is missing, while required, read-only and the others mapped in NodeWrapper::state are present.

Proposed change:

  • accesskit_consumer: add Node::is_invalid() (or expose invalid()).
  • adapters/atspi-common/src/node.rs, NodeWrapper::state: next to the is_required() check, add
    if state.is_invalid() {
        atspi_state.insert(State::InvalidEntry);
    }
    

For other platforms: UIA has IsDataValidForForm (Windows), and macOS has AXInvalid. I can look at those too if that's wanted.

主要语言
Rust
星标
1.6k
派生
135
平均合并
10 小时 53 分钟
30 天内合并 PR
11

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AccessKit/accesskit 的其他 Issue

查看 AccessKit/accesskit 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。