Skip to content

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

Open

Description

@krazyjakee

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions