Skip to content

Supports accessibilityStates in ByRole queries #1134

Closed
@AugustinLF

Description

@AugustinLF

Describe the Feature

Like in @testing-library/dom (see docs), we should support accessibility states when querying by role.

The accessibilityStates existing are

  • disabled: Indicates whether the element is disabled or not
  • selected: Indicates whether a selectable element is currently selected or not
  • checked: Indicates the state of a checkable element.
  • busy: Indicates whether an element is currently busy or not
  • expanded: Indicates whether an expandable element is currently expanded or collapsed

Possible Implementations

We could like in DTL check which states correspond to which role and throw. But I'd treat that as a bonus and not a necessity.

Related Issues

#1133

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions