acquiescence - v0.1.16
    Preparing search index...

    Class ElementDescriber

    Describes elements by facts a tool can name them by, such as their role, accessible name, labels, and attributes, without choosing among them.

    Index
    • Describes the element a user acting on an element acts on: the element itself if it takes text, or else its closest interactive ancestor, if any; and the ancestors within its root, below the document element, that have a test ID, an ID, or a role.

      Parameters

      • element: Element

        {Element} The element acted on.

      • options: ElementDescriptionOptions = {}

        {ElementDescriptionOptions} Options for the description.

      Returns ElementDescription

      The description.

    • Gets the element a user acting on an element acts on.

      Parameters

      • element: Element

        {Element} The element acted on.

      Returns Element

      The element itself if it takes text, or else its closest interactive ancestor, or itself.