Circle V2 API Docs
    Preparing search index...

    Interface ByRoleOptions

    interface ByRoleOptions {
        busy?: boolean;
        checked?: boolean;
        current?: string | boolean;
        description?:
            | string
            | RegExp
            | ((accessibleDescription: string, element: Element) => boolean);
        expanded?: boolean;
        hidden?: boolean;
        level?: number;
        name?:
            | string
            | RegExp
            | ((accessibleName: string, element: Element) => boolean);
        pressed?: boolean;
        queryFallbacks?: boolean;
        selected?: boolean;
        suggest?: boolean;
        value?: { max?: number; min?: number; now?: number; text?: Matcher };
    }
    Index

    Properties

    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"

    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"

    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.

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

    Only considers elements with the specified accessible description.

    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"

    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.

    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.

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

    Only considers elements with the specified accessible name.

    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"

    queryFallbacks?: boolean

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

    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"

    suggest?: boolean

    suppress suggestions for a specific query

    value?: { max?: number; min?: number; now?: number; text?: Matcher }