Interface: ByRoleOptions
Properties
busy?
optionalbusy?: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?
optionalchecked?: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?
optionalcurrent?: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?
optionaldescription?:string|RegExp| ((accessibleDescription:string,element:Element) =>boolean)
Only considers elements with the specified accessible description.
expanded?
optionalexpanded?: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?
optionalhidden?: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?
optionallevel?: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?
optionalname?:string|RegExp| ((accessibleName:string,element:Element) =>boolean)
Only considers elements with the specified accessible name.
pressed?
optionalpressed?: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?
optionalqueryFallbacks?:boolean
Includes every role used in the role attribute
For example *ByRole('progressbar', {queryFallbacks: true}) will find <div role="meter progressbar">.
selected?
optionalselected?: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?
optionalsuggest?:boolean
suppress suggestions for a specific query
value?
optionalvalue?:object
max?
optionalmax?:number
min?
optionalmin?:number
now?
optionalnow?:number
text?
optionaltext?:Matcher