Skip to content

API Reference / @gtkx/testing / ByRoleOptions

Type Alias: ByRoleOptions<T> ​

ByRoleOptions<T> = MatcherOptions<T> & object

Defined in: packages/testing/src/types.ts:79

Options for role queries: an accessible name matcher plus accessible state and value constraints.

Type Declaration ​

busy? ​

optional busy?: boolean

Required busy state, which an unset state satisfies as false.

checked? ​

optional checked?: boolean

Required checked state; a mixed check button reads as neither, so it matches neither value.

description? ​

optional description?: Matcher

Matcher for the widget's own accessible description, ignoring its described-by targets.

expanded? ​

optional expanded?: boolean

Required expanded state of an expander or tree expander.

hidden? ​

optional hidden?: boolean

When true, include widgets excluded from the accessibility tree. Widgets that are not mapped stay excluded.

level? ​

optional level?: number

Heading or hierarchy level.

name? ​

optional name?: Matcher

Matcher for the widget's accessible name.

pressed? ​

optional pressed?: boolean

Required active state of a toggle button; any other widget matches neither value.

selected? ​

optional selected?: boolean

Required selected state of a row, list item, grid cell, option or tree item.

value? ​

optional value?: ByRoleValue

Constraints on the widget's range value, each checked only when given.

Type Parameters ​

T ​

T extends Gtk.Accessible = Gtk.Accessible