Skip to content

Add docs for queryFallbacks for *ByRole in dom-testing-library #386

@iAziz786

Description

@iAziz786

As dom-testing-library now has support for queryFallbacks, I'll add it into the docs so that others will be aware of it. As mentioned by Kent, I'll add this relevant paragraph as part of it and also how to use it.

An element doesn't have multiple roles in a given environment. It has a single one. Multiple roles in the attribute are evaluated from left to right until the environment finds the first role it understands. This is useful when new roles get introduced and you want to start supporting those as well as older environments that don't understand that role (yet).

Please let me know do I have to add anything else?

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