import { type queries } from "https://deno.land/x/fresh_testing_library@0.13.1/mod.ts";
const { ByRoleOptions } = queries;
Properties
If true only includes elements in the query set that are marked as
selected in the accessibility tree, i.e., aria-selected="true"
If true only includes elements in the query set that are marked as
checked in the accessibility tree, i.e., aria-checked="true"
If true only includes elements in the query set that are marked as
pressed in the accessibility tree, i.e., aria-pressed="true"
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.
If true only includes elements in the query set that are marked as
expanded in the accessibility tree, i.e., aria-expanded="true"
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.
Includes every role used in the role
attribute
For example *ByRole('progressbar', {queryFallbacks: true}) will find <div role="meter progressbar">
.
Only considers elements with the specified accessible name.