File tree Expand file tree Collapse file tree 3 files changed +8
-138
lines changed Expand file tree Collapse file tree 3 files changed +8
-138
lines changed Original file line number Diff line number Diff line change 39
39
],
40
40
"dependencies" : {
41
41
"@babel/runtime" : " ^7.10.3" ,
42
+ "@types/aria-query" : " ^4.2.0" ,
42
43
"aria-query" : " ^4.2.2" ,
43
44
"dom-accessibility-api" : " ^0.4.5" ,
44
45
"pretty-format" : " ^25.5.0"
Original file line number Diff line number Diff line change
1
+ import { ARIARole } from 'aria-query'
2
+
1
3
export type MatcherFunction = ( content : string , element : HTMLElement ) => boolean
2
4
export type Matcher = string | RegExp | MatcherFunction
3
5
4
6
// important to use String here
5
7
// this gives us intellisense but it can also accept values
6
8
// that are not included in the union types
7
- export type ByRoleMatcher = AllowedRoles | String | RegExp | MatcherFunction
8
- export type AllowedRoles =
9
- | 'alert'
10
- | 'alertdialog'
11
- | 'application'
12
- | 'article'
13
- | 'banner'
14
- | 'blockquote'
15
- | 'button'
16
- | 'caption'
17
- | 'cell'
18
- | 'checkbox'
19
- | 'code'
20
- | 'columnheader'
21
- | 'combobox'
22
- | 'complementary'
23
- | 'contentinfo'
24
- | 'definition'
25
- | 'deletion'
26
- | 'dialog'
27
- | 'directory'
28
- | 'document'
29
- | 'emphasis'
30
- | 'feed'
31
- | 'figure'
32
- | 'form'
33
- | 'generic'
34
- | 'grid'
35
- | 'gridcell'
36
- | 'group'
37
- | 'heading'
38
- | 'img'
39
- | 'insertion'
40
- | 'link'
41
- | 'list'
42
- | 'listbox'
43
- | 'listitem'
44
- | 'log'
45
- | 'main'
46
- | 'marquee'
47
- | 'math'
48
- | 'menu'
49
- | 'menubar'
50
- | 'menuitem'
51
- | 'menuitemcheckbox'
52
- | 'menuitemradio'
53
- | 'meter'
54
- | 'navigation'
55
- | 'none'
56
- | 'note'
57
- | 'option'
58
- | 'paragraph'
59
- | 'presentation'
60
- | 'progressbar'
61
- | 'radio'
62
- | 'radiogroup'
63
- | 'region'
64
- | 'row'
65
- | 'rowgroup'
66
- | 'rowheader'
67
- | 'scrollbar'
68
- | 'search'
69
- | 'searchbox'
70
- | 'separator'
71
- | 'slider'
72
- | 'spinbutton'
73
- | 'status'
74
- | 'strong'
75
- | 'subscript'
76
- | 'superscript'
77
- | 'switch'
78
- | 'tab'
79
- | 'table'
80
- | 'tablist'
81
- | 'tabpanel'
82
- | 'term'
83
- | 'textbox'
84
- | 'time'
85
- | 'timer'
86
- | 'toolbar'
87
- | 'tooltip'
88
- | 'tree'
89
- | 'treegrid'
90
- | 'treeitem'
91
- | 'command'
92
- | 'composite'
93
- | 'input'
94
- | 'landmark'
95
- | 'range'
96
- | 'roletype'
97
- | 'section'
98
- | 'sectionhead'
99
- | 'select'
100
- | 'structure'
101
- | 'widget'
102
- | 'window'
103
- | 'doc-abstract'
104
- | 'doc-acknowledgments'
105
- | 'doc-afterword'
106
- | 'doc-appendix'
107
- | 'doc-backlink'
108
- | 'doc-biblioentry'
109
- | 'doc-bibliography'
110
- | 'doc-biblioref'
111
- | 'doc-chapter'
112
- | 'doc-colophon'
113
- | 'doc-conclusion'
114
- | 'doc-cover'
115
- | 'doc-credit'
116
- | 'doc-credits'
117
- | 'doc-dedication'
118
- | 'doc-endnote'
119
- | 'doc-endnotes'
120
- | 'doc-epigraph'
121
- | 'doc-epilogue'
122
- | 'doc-errata'
123
- | 'doc-example'
124
- | 'doc-footnote'
125
- | 'doc-foreword'
126
- | 'doc-glossary'
127
- | 'doc-glossref'
128
- | 'doc-index'
129
- | 'doc-introduction'
130
- | 'doc-noteref'
131
- | 'doc-notice'
132
- | 'doc-pagebreak'
133
- | 'doc-pagelist'
134
- | 'doc-part'
135
- | 'doc-preface'
136
- | 'doc-prologue'
137
- | 'doc-pullquote'
138
- | 'doc-qna'
139
- | 'doc-subtitle'
140
- | 'doc-tip'
141
- | 'doc-toc'
9
+ // eslint-disable-next-line ban-types
10
+ export type ByRoleMatcher = ARIARole | String | RegExp | MatcherFunction
142
11
143
12
export type NormalizerFn = ( text : string ) => string
144
13
Original file line number Diff line number Diff line change 1
- import { Matcher , MatcherOptions , ByRoleMatcher } from './matches'
2
- import { SelectorMatcherOptions } from './query-helpers'
3
- import { waitForOptions } from './wait-for'
1
+ import { Matcher , MatcherOptions , ByRoleMatcher } from './matches'
2
+ import { SelectorMatcherOptions } from './query-helpers'
3
+ import { waitForOptions } from './wait-for'
4
4
5
5
export type QueryByBoundAttribute = (
6
6
container : HTMLElement ,
You can’t perform that action at this time.
0 commit comments