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

Open Beginner friendly
#858 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
accessibility

Research direction

Read NodeWrapper::state in adapters/atspi-common/src/node.rs and check how Node::is_required() and related state mappings work. Then locate the accesskit_consumer API for exposing a node's invalid value. Done when nodes with any Invalid value include AT-SPI's State::InvalidEntry; verify by following the reproduction with Accerciser or atspi.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Rust
Stars
1.6k
Forks
135
Avg merge
10h 53m
Merged PRs (30d)
11

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AccessKit/accesskit

All issues in AccessKit/accesskit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.