@testing-library/user-event 7.1.0 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.all-contributorsrc +9 -0
- package/README.md +54 -1
- package/__tests__/react/selectoptions.js +2 -1
- package/__tests__/react/tab.js +164 -101
- package/dist/index.js +3 -2
- package/package.json +19 -19
- package/src/index.js +4 -4
package/.all-contributorsrc
CHANGED
|
@@ -131,6 +131,15 @@
|
|
|
131
131
|
"contributions": [
|
|
132
132
|
"doc"
|
|
133
133
|
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"login": "benmonro",
|
|
137
|
+
"name": "Ben Monro",
|
|
138
|
+
"avatar_url": "https://avatars3.githubusercontent.com/u/399236?v=4",
|
|
139
|
+
"profile": "https://github.com/benmonro",
|
|
140
|
+
"contributions": [
|
|
141
|
+
"code"
|
|
142
|
+
]
|
|
134
143
|
}
|
|
135
144
|
],
|
|
136
145
|
"commitConvention": "none"
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
[](https://travis-ci.org/testing-library/user-event)
|
|
21
21
|
[](https://codeclimate.com/github/testing-library/user-event/maintainability)
|
|
22
22
|
[](https://codeclimate.com/github/testing-library/user-event/test_coverage)
|
|
23
|
-
[](#contributors-)
|
|
24
24
|
|
|
25
25
|
## The problem
|
|
26
26
|
|
|
@@ -167,6 +167,57 @@ expect(getByTestId("val3").selected).toBe(true);
|
|
|
167
167
|
The `values` parameter can be either an array of values or a singular scalar
|
|
168
168
|
value.
|
|
169
169
|
|
|
170
|
+
### `tab({shift, focusTrap})`
|
|
171
|
+
|
|
172
|
+
Fires a tab event changing the document.activeElement in the same way the
|
|
173
|
+
browser does.
|
|
174
|
+
|
|
175
|
+
Options:
|
|
176
|
+
|
|
177
|
+
- `shift` (default `false`) can be true or false to invert tab direction.
|
|
178
|
+
- `focusTrap` (default `document`) a container element to restrict the tabbing
|
|
179
|
+
within.
|
|
180
|
+
|
|
181
|
+
> **A note about tab**: [jsdom does not support tabbing](https://github.com/jsdom/jsdom/issues/2102), so this feature is a way to enable tests to verify tabbing from the end user's perspective. However, this limitation in jsdom will mean that components like [focus-trap-react](https://github.com/davidtheclark/focus-trap-react) will not work with `userEvent.tab()` or jsdom. For that reason, the `focusTrap` option is available to let you ensure your user is restricted within a focus-trap.
|
|
182
|
+
|
|
183
|
+
```jsx
|
|
184
|
+
import React from "react";
|
|
185
|
+
import { render } from "@testing-library/react";
|
|
186
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
187
|
+
import userEvent from "@testing-library/user-event";
|
|
188
|
+
|
|
189
|
+
it("should cycle elements in document tab order", () => {
|
|
190
|
+
const { getAllByTestId } = render(
|
|
191
|
+
<div>
|
|
192
|
+
<input data-testid="element" type="checkbox" />
|
|
193
|
+
<input data-testid="element" type="radio" />
|
|
194
|
+
<input data-testid="element" type="number" />
|
|
195
|
+
</div>
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
const [checkbox, radio, number] = getAllByTestId("element");
|
|
199
|
+
|
|
200
|
+
expect(document.body).toHaveFocus();
|
|
201
|
+
|
|
202
|
+
userEvent.tab();
|
|
203
|
+
|
|
204
|
+
expect(checkbox).toHaveFocus();
|
|
205
|
+
|
|
206
|
+
userEvent.tab();
|
|
207
|
+
|
|
208
|
+
expect(radio).toHaveFocus();
|
|
209
|
+
|
|
210
|
+
userEvent.tab();
|
|
211
|
+
|
|
212
|
+
expect(number).toHaveFocus();
|
|
213
|
+
|
|
214
|
+
userEvent.tab();
|
|
215
|
+
|
|
216
|
+
// cycle goes back to first element
|
|
217
|
+
expect(checkbox).toHaveFocus();
|
|
218
|
+
});
|
|
219
|
+
```
|
|
220
|
+
|
|
170
221
|
## Contributors
|
|
171
222
|
|
|
172
223
|
Thanks goes to these wonderful people
|
|
@@ -191,11 +242,13 @@ Thanks goes to these wonderful people
|
|
|
191
242
|
<td align="center"><a href="https://github.com/bogdanbodnar"><img src="https://avatars2.githubusercontent.com/u/9034868?v=4" width="100px;" alt="Bodnar Bogdan"/><br /><sub><b>Bodnar Bogdan</b></sub></a><br /><a href="https://github.com/testing-library/user-event/issues?q=author%3Abogdanbodnar" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/user-event/commits?author=bogdanbodnar" title="Code">💻</a></td>
|
|
192
243
|
<td align="center"><a href="https://zach.website"><img src="https://avatars0.githubusercontent.com/u/1699281?v=4" width="100px;" alt="Zach Perrault"/><br /><sub><b>Zach Perrault</b></sub></a><br /><a href="https://github.com/testing-library/user-event/commits?author=zperrault" title="Documentation">📖</a></td>
|
|
193
244
|
<td align="center"><a href="https://twitter.com/ryanastelly"><img src="https://avatars1.githubusercontent.com/u/4138357?v=4" width="100px;" alt="Ryan Stelly"/><br /><sub><b>Ryan Stelly</b></sub></a><br /><a href="https://github.com/testing-library/user-event/commits?author=FLGMwt" title="Documentation">📖</a></td>
|
|
245
|
+
<td align="center"><a href="https://github.com/benmonro"><img src="https://avatars3.githubusercontent.com/u/399236?v=4" width="100px;" alt="Ben Monro"/><br /><sub><b>Ben Monro</b></sub></a><br /><a href="https://github.com/testing-library/user-event/commits?author=benmonro" title="Code">💻</a></td>
|
|
194
246
|
</tr>
|
|
195
247
|
</table>
|
|
196
248
|
|
|
197
249
|
<!-- markdownlint-enable -->
|
|
198
250
|
<!-- prettier-ignore-end -->
|
|
251
|
+
|
|
199
252
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
200
253
|
|
|
201
254
|
This project follows the
|
package/__tests__/react/tab.js
CHANGED
|
@@ -4,156 +4,219 @@ import "@testing-library/jest-dom/extend-expect";
|
|
|
4
4
|
import userEvent from "../../src";
|
|
5
5
|
|
|
6
6
|
describe("userEvent.tab", () => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
it("should cycle elements in document tab order", () => {
|
|
8
|
+
const { getAllByTestId } = render(
|
|
9
|
+
<div>
|
|
10
|
+
<input data-testid="element" type="checkbox" />
|
|
11
|
+
<input data-testid="element" type="radio" />
|
|
12
|
+
<input data-testid="element" type="number" />
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const [checkbox, radio, number] = getAllByTestId("element");
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
expect(document.body).toHaveFocus();
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
userEvent.tab();
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
expect(checkbox).toHaveFocus();
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
userEvent.tab();
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
expect(radio).toHaveFocus();
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
userEvent.tab();
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
expect(number).toHaveFocus();
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
userEvent.tab();
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
// cycle goes back to first element
|
|
35
|
+
expect(checkbox).toHaveFocus();
|
|
36
|
+
});
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
it("should go backwards when shift = true", () => {
|
|
39
|
+
const { getAllByTestId } = render(
|
|
40
|
+
<div>
|
|
41
|
+
<input data-testid="element" type="checkbox" />
|
|
42
|
+
<input data-testid="element" type="radio" />
|
|
43
|
+
<input data-testid="element" type="number" />
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const [checkbox, radio, number] = getAllByTestId("element");
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
radio.focus();
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
userEvent.tab({ shift: true });
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
expect(checkbox).toHaveFocus();
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
userEvent.tab({ shift: true });
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
expect(number).toHaveFocus();
|
|
58
|
+
});
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
it("should respect tabindex, regardless of dom position", () => {
|
|
61
|
+
const { getAllByTestId } = render(
|
|
62
|
+
<div>
|
|
63
|
+
<input data-testid="element" tabIndex={2} type="checkbox" />
|
|
64
|
+
<input data-testid="element" tabIndex={1} type="radio" />
|
|
65
|
+
<input data-testid="element" tabIndex={3} type="number" />
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
const [checkbox, radio, number] = getAllByTestId("element");
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
userEvent.tab();
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
expect(radio).toHaveFocus();
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
userEvent.tab();
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
expect(checkbox).toHaveFocus();
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
userEvent.tab();
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
expect(number).toHaveFocus();
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
userEvent.tab();
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
expect(radio).toHaveFocus();
|
|
86
|
+
});
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
it("should respect dom order when tabindex are all the same", () => {
|
|
89
|
+
const { getAllByTestId } = render(
|
|
90
|
+
<div>
|
|
91
|
+
<input data-testid="element" tabIndex={0} type="checkbox" />
|
|
92
|
+
<input data-testid="element" tabIndex={1} type="radio" />
|
|
93
|
+
<input data-testid="element" tabIndex={0} type="number" />
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
const [checkbox, radio, number] = getAllByTestId("element");
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
userEvent.tab();
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
expect(checkbox).toHaveFocus();
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
userEvent.tab();
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
expect(number).toHaveFocus();
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
userEvent.tab();
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
expect(radio).toHaveFocus();
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
userEvent.tab();
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
expect(checkbox).toHaveFocus();
|
|
114
|
+
});
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
it("should suport a mix of elements with/without tab index", () => {
|
|
117
|
+
const { getAllByTestId } = render(
|
|
118
|
+
<div>
|
|
119
|
+
<input data-testid="element" tabIndex={0} type="checkbox" />
|
|
120
|
+
<input data-testid="element" tabIndex={1} type="radio" />
|
|
121
|
+
<input data-testid="element" type="number" />
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
const [checkbox, radio, number] = getAllByTestId("element");
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
userEvent.tab();
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
expect(checkbox).toHaveFocus();
|
|
130
|
+
userEvent.tab();
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
expect(number).toHaveFocus();
|
|
133
|
+
userEvent.tab();
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
expect(radio).toHaveFocus();
|
|
136
|
+
});
|
|
136
137
|
|
|
137
|
-
|
|
138
|
+
it("should not tab to <a> with no href", () => {
|
|
139
|
+
const { getAllByTestId } = render(
|
|
140
|
+
<div>
|
|
141
|
+
<input data-testid="element" tabIndex={0} type="checkbox" />
|
|
142
|
+
<a>ignore this</a>
|
|
143
|
+
<a data-testid="element" href="http://www.testingjavascript.com">
|
|
144
|
+
a link
|
|
145
|
+
</a>
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
138
148
|
|
|
139
|
-
|
|
140
|
-
const { getAllByTestId } = render(
|
|
141
|
-
<div>
|
|
142
|
-
<input data-testid="element" tabIndex={0} type="checkbox" />
|
|
143
|
-
<a>ignore this</a>
|
|
144
|
-
<a data-testid="element" href="http://www.testingjavascript.com">a link</a>
|
|
145
|
-
</div>
|
|
146
|
-
);
|
|
149
|
+
const [checkbox, link] = getAllByTestId("element");
|
|
147
150
|
|
|
148
|
-
|
|
151
|
+
userEvent.tab();
|
|
149
152
|
|
|
150
|
-
|
|
153
|
+
expect(checkbox).toHaveFocus();
|
|
151
154
|
|
|
152
|
-
|
|
155
|
+
userEvent.tab();
|
|
153
156
|
|
|
154
|
-
|
|
157
|
+
expect(link).toHaveFocus();
|
|
158
|
+
});
|
|
155
159
|
|
|
156
|
-
|
|
157
|
-
}
|
|
160
|
+
it("should stay within a focus trab", () => {
|
|
161
|
+
const { getAllByTestId, getByTestId } = render(
|
|
162
|
+
<>
|
|
163
|
+
<div data-testid="div1">
|
|
164
|
+
<input data-testid="element" type="checkbox" />
|
|
165
|
+
<input data-testid="element" type="radio" />
|
|
166
|
+
<input data-testid="element" type="number" />
|
|
167
|
+
</div>
|
|
168
|
+
<div data-testid="div2">
|
|
169
|
+
<input data-testid="element" foo="bar" type="checkbox" />
|
|
170
|
+
<input data-testid="element" foo="bar" type="radio" />
|
|
171
|
+
<input data-testid="element" foo="bar" type="number" />
|
|
172
|
+
</div>
|
|
173
|
+
</>
|
|
174
|
+
);
|
|
158
175
|
|
|
176
|
+
const [div1, div2] = [getByTestId("div1"), getByTestId("div2")];
|
|
177
|
+
const [
|
|
178
|
+
checkbox1,
|
|
179
|
+
radio1,
|
|
180
|
+
number1,
|
|
181
|
+
checkbox2,
|
|
182
|
+
radio2,
|
|
183
|
+
number2
|
|
184
|
+
] = getAllByTestId("element");
|
|
185
|
+
|
|
186
|
+
expect(document.body).toHaveFocus();
|
|
187
|
+
|
|
188
|
+
userEvent.tab({ focusTrap: div1 });
|
|
189
|
+
|
|
190
|
+
expect(checkbox1).toHaveFocus();
|
|
191
|
+
|
|
192
|
+
userEvent.tab({ focusTrap: div1 });
|
|
193
|
+
|
|
194
|
+
expect(radio1).toHaveFocus();
|
|
195
|
+
|
|
196
|
+
userEvent.tab({ focusTrap: div1 });
|
|
197
|
+
|
|
198
|
+
expect(number1).toHaveFocus();
|
|
199
|
+
|
|
200
|
+
userEvent.tab({ focusTrap: div1 });
|
|
201
|
+
|
|
202
|
+
// cycle goes back to first element
|
|
203
|
+
expect(checkbox1).toHaveFocus();
|
|
204
|
+
|
|
205
|
+
userEvent.tab({ focusTrap: div2 });
|
|
206
|
+
|
|
207
|
+
expect(checkbox2).toHaveFocus();
|
|
208
|
+
|
|
209
|
+
userEvent.tab({ focusTrap: div2 });
|
|
210
|
+
|
|
211
|
+
expect(radio2).toHaveFocus();
|
|
212
|
+
|
|
213
|
+
userEvent.tab({ focusTrap: div2 });
|
|
214
|
+
|
|
215
|
+
expect(number2).toHaveFocus();
|
|
216
|
+
|
|
217
|
+
userEvent.tab({ focusTrap: div2 });
|
|
218
|
+
|
|
219
|
+
// cycle goes back to first element
|
|
220
|
+
expect(checkbox2).toHaveFocus();
|
|
221
|
+
});
|
|
159
222
|
});
|
package/dist/index.js
CHANGED
|
@@ -281,9 +281,10 @@ const userEvent = {
|
|
|
281
281
|
},
|
|
282
282
|
|
|
283
283
|
tab({
|
|
284
|
-
shift = false
|
|
284
|
+
shift = false,
|
|
285
|
+
focusTrap = document
|
|
285
286
|
} = {}) {
|
|
286
|
-
const focusableElements =
|
|
287
|
+
const focusableElements = focusTrap.querySelectorAll("input, button, select, textarea, a[href], [tabindex]");
|
|
287
288
|
const list = Array.prototype.filter.call(focusableElements, function (item) {
|
|
288
289
|
return item.getAttribute("tabindex") !== "-1";
|
|
289
290
|
}).sort((a, b) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testing-library/user-event",
|
|
3
|
-
"version": "7.1
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"description": "Simulate user events for react-testing-library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-testing-library",
|
|
@@ -32,29 +32,29 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/testing-library/user-event#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@babel/cli": "7.
|
|
36
|
-
"@babel/core": "7.
|
|
37
|
-
"@babel/preset-env": "7.6
|
|
38
|
-
"@babel/preset-react": "7.
|
|
39
|
-
"@testing-library/dom": "6.
|
|
40
|
-
"@testing-library/jest-dom": "4.
|
|
41
|
-
"@testing-library/react": "9.
|
|
42
|
-
"@testing-library/vue": "
|
|
43
|
-
"all-contributors-cli": "6.
|
|
35
|
+
"@babel/cli": "^7.7.5",
|
|
36
|
+
"@babel/core": "^7.7.5",
|
|
37
|
+
"@babel/preset-env": "^7.7.6",
|
|
38
|
+
"@babel/preset-react": "^7.7.4",
|
|
39
|
+
"@testing-library/dom": "^6.11.0",
|
|
40
|
+
"@testing-library/jest-dom": "^4.2.4",
|
|
41
|
+
"@testing-library/react": "^9.4.0",
|
|
42
|
+
"@testing-library/vue": "^4.1.0",
|
|
43
|
+
"all-contributors-cli": "^6.11.2",
|
|
44
44
|
"babel-core": "7.0.0-bridge.0",
|
|
45
45
|
"babel-jest": "24.9.0",
|
|
46
|
-
"codecov": "3.
|
|
47
|
-
"husky": "3.0
|
|
46
|
+
"codecov": "3.6.1",
|
|
47
|
+
"husky": "^3.1.0",
|
|
48
48
|
"jest": "24.9.0",
|
|
49
|
-
"lint-staged": "9.
|
|
50
|
-
"prettier": "1.
|
|
51
|
-
"react": "16.
|
|
52
|
-
"react-dom": "16.
|
|
49
|
+
"lint-staged": "^9.5.0",
|
|
50
|
+
"prettier": "^1.19.1",
|
|
51
|
+
"react": "^16.12.0",
|
|
52
|
+
"react-dom": "^16.12.0",
|
|
53
53
|
"regenerator-runtime": "0.13.3",
|
|
54
|
-
"semantic-release": "15.13.
|
|
54
|
+
"semantic-release": "^15.13.31",
|
|
55
55
|
"travis-deploy-once": "5.0.11",
|
|
56
|
-
"vue": "^2.6.
|
|
57
|
-
"vue-template-compiler": "^2.6.
|
|
56
|
+
"vue": "^2.6.11",
|
|
57
|
+
"vue-template-compiler": "^2.6.11"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@testing-library/dom": ">=5"
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fireEvent } from "@testing-library/dom";
|
|
2
2
|
|
|
3
3
|
function wait(time) {
|
|
4
|
-
return new Promise(function
|
|
4
|
+
return new Promise(function(resolve) {
|
|
5
5
|
setTimeout(() => resolve(), time);
|
|
6
6
|
});
|
|
7
7
|
}
|
|
@@ -226,12 +226,12 @@ const userEvent = {
|
|
|
226
226
|
element.addEventListener("blur", fireChangeEvent);
|
|
227
227
|
},
|
|
228
228
|
|
|
229
|
-
tab({ shift = false } = {}) {
|
|
230
|
-
const focusableElements =
|
|
229
|
+
tab({ shift = false, focusTrap = document } = {}) {
|
|
230
|
+
const focusableElements = focusTrap.querySelectorAll(
|
|
231
231
|
"input, button, select, textarea, a[href], [tabindex]"
|
|
232
232
|
);
|
|
233
233
|
const list = Array.prototype.filter
|
|
234
|
-
.call(focusableElements, function
|
|
234
|
+
.call(focusableElements, function(item) {
|
|
235
235
|
return item.getAttribute("tabindex") !== "-1";
|
|
236
236
|
})
|
|
237
237
|
.sort((a, b) => {
|