For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/reactlynx-testing-library/Interface.ByRoleOptions.md.
Lynx
  • English
  • reactlynx-testing-library / ByRoleOptions

    ByRoleOptions

    Properties

    busy?

    optional busy: boolean;

    If true only includes elements in the query set that are marked as busy in the accessibility tree, i.e., aria-busy="true"

    Defined in

    index.d.ts:227


    checked?

    optional checked: boolean;

    If true only includes elements in the query set that are marked as checked in the accessibility tree, i.e., aria-checked="true"

    Defined in

    index.d.ts:232


    current?

    optional current: string | boolean;

    Filters elements by their aria-current state. true and false match aria-current="true" and aria-current="false" (as well as a missing aria-current attribute) respectively.

    Defined in

    index.d.ts:241


    description?

    optional description: string | RegExp | (accessibleDescription: string, element: Element) => boolean;

    Only considers elements with the specified accessible description.

    Defined in

    index.d.ts:274


    expanded?

    optional expanded: boolean;

    If true only includes elements in the query set that are marked as expanded in the accessibility tree, i.e., aria-expanded="true"

    Defined in

    index.d.ts:246


    hidden?

    optional hidden: boolean;

    If true includes elements in the query set that are usually excluded from the accessibility tree. role="none" or role="presentation" are included in either case.

    Defined in

    index.d.ts:217


    level?

    optional level: number;

    Includes elements with the "heading" role matching the indicated level, either by the semantic HTML heading elements <h1>-<h6> or matching the aria-level attribute.

    Defined in

    index.d.ts:252


    name?

    optional name: string | RegExp | (accessibleName: string, element: Element) => boolean;

    Only considers elements with the specified accessible name.

    Defined in

    index.d.ts:267


    pressed?

    optional pressed: boolean;

    If true only includes elements in the query set that are marked as pressed in the accessibility tree, i.e., aria-pressed="true"

    Defined in

    index.d.ts:237


    queryFallbacks?

    optional queryFallbacks: boolean;

    Includes every role used in the role attribute For example *ByRole('progressbar', {queryFallbacks: true}) will find <div role="meter progressbar">.

    Defined in

    index.d.ts:263


    selected?

    optional selected: boolean;

    If true only includes elements in the query set that are marked as selected in the accessibility tree, i.e., aria-selected="true"

    Defined in

    index.d.ts:222


    suggest?

    optional suggest: boolean;

    suppress suggestions for a specific query

    Defined in

    index.d.ts:211


    value?

    optional value: object;

    max?

    optional max: number;

    min?

    optional min: number;

    now?

    optional now: number;

    text?

    optional text: Matcher;

    Defined in

    index.d.ts:253

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.