@@ -86,10 +86,10 @@ describe('WAI ARIA Spec', () => {
86
86
function evaluateIsExpanded ( buttonHandle ) {
87
87
return page
88
88
. evaluate (
89
- heading => heading . getAttribute ( 'aria-expanded' ) ,
89
+ ( heading ) => heading . getAttribute ( 'aria-expanded' ) ,
90
90
buttonHandle ,
91
91
)
92
- . then ( ariaExpanded => ariaExpanded === 'true' ) ;
92
+ . then ( ( ariaExpanded ) => ariaExpanded === 'true' ) ;
93
93
}
94
94
95
95
// ENTER key
@@ -132,7 +132,7 @@ describe('WAI ARIA Spec', () => {
132
132
await firstButtonHandle . focus ( ) ;
133
133
await page . keyboard . press ( 'Tab' ) ;
134
134
const secondIsFocussed = await page . evaluate (
135
- button => document . activeElement === button ,
135
+ ( button ) => document . activeElement === button ,
136
136
secondButtonHandle ,
137
137
) ;
138
138
expect ( secondIsFocussed ) . toEqual ( true ) ;
@@ -150,7 +150,7 @@ describe('WAI ARIA Spec', () => {
150
150
await page . keyboard . press ( 'Tab' ) ;
151
151
await page . keyboard . up ( 'Shift' ) ;
152
152
const firstIsFocussed = await page . evaluate (
153
- button => document . activeElement === button ,
153
+ ( button ) => document . activeElement === button ,
154
154
firstButtonHandle ,
155
155
) ;
156
156
expect ( firstIsFocussed ) . toEqual ( true ) ;
@@ -165,7 +165,7 @@ describe('WAI ARIA Spec', () => {
165
165
await firstButtonHandle . focus ( ) ;
166
166
await page . keyboard . press ( 'ArrowDown' ) ;
167
167
const secondIsFocussed = await page . evaluate (
168
- button => document . activeElement === button ,
168
+ ( button ) => document . activeElement === button ,
169
169
secondButtonHandle ,
170
170
) ;
171
171
expect ( secondIsFocussed ) . toEqual ( true ) ;
@@ -185,7 +185,7 @@ describe('WAI ARIA Spec', () => {
185
185
await secondButtonHandle . focus ( ) ;
186
186
await page . keyboard . press ( 'ArrowUp' ) ;
187
187
const firstIsFocussed = await page . evaluate (
188
- button => document . activeElement === button ,
188
+ ( button ) => document . activeElement === button ,
189
189
firstButtonHandle ,
190
190
) ;
191
191
expect ( firstIsFocussed ) . toEqual ( true ) ;
@@ -209,7 +209,7 @@ describe('WAI ARIA Spec', () => {
209
209
await thirdButtonHandle . focus ( ) ;
210
210
await page . keyboard . press ( 'Home' ) ;
211
211
const firstIsFocussed = await page . evaluate (
212
- button => document . activeElement === button ,
212
+ ( button ) => document . activeElement === button ,
213
213
firstButtonHandle ,
214
214
) ;
215
215
expect ( firstIsFocussed ) . toEqual ( true ) ;
@@ -228,7 +228,7 @@ describe('WAI ARIA Spec', () => {
228
228
await firstButtonHandle . focus ( ) ;
229
229
await page . keyboard . press ( 'End' ) ;
230
230
const thirdIsFocussed = await page . evaluate (
231
- button => document . activeElement === button ,
231
+ ( button ) => document . activeElement === button ,
232
232
thirdButtonHandle ,
233
233
) ;
234
234
expect ( thirdIsFocussed ) . toEqual ( true ) ;
@@ -246,7 +246,7 @@ describe('WAI ARIA Spec', () => {
246
246
for ( const buttonHandle of buttonsHandles ) {
247
247
expect (
248
248
await page . evaluate (
249
- button => button . getAttribute ( 'role' ) ,
249
+ ( button ) => button . getAttribute ( 'role' ) ,
250
250
buttonHandle ,
251
251
) ,
252
252
) . toBe ( 'button' ) ;
@@ -261,14 +261,14 @@ describe('WAI ARIA Spec', () => {
261
261
for ( const buttonHandle of buttonsHandles ) {
262
262
expect (
263
263
await page . evaluate (
264
- button => button . parentElement . getAttribute ( 'role' ) ,
264
+ ( button ) => button . parentElement . getAttribute ( 'role' ) ,
265
265
buttonHandle ,
266
266
) ,
267
267
) . toBe ( 'heading' ) ;
268
268
269
269
expect (
270
270
await page . evaluate (
271
- button =>
271
+ ( button ) =>
272
272
button . parentElement . getAttribute ( 'aria-level' ) ,
273
273
buttonHandle ,
274
274
) ,
@@ -292,14 +292,14 @@ describe('WAI ARIA Spec', () => {
292
292
for ( const handle of headingsHandles ) {
293
293
expect (
294
294
await page . evaluate (
295
- heading => heading . childNodes . length === 1 ,
295
+ ( heading ) => heading . childNodes . length === 1 ,
296
296
handle ,
297
297
) ,
298
298
) . toEqual ( true ) ;
299
299
300
300
expect (
301
301
await page . evaluate (
302
- heading =>
302
+ ( heading ) =>
303
303
heading . firstChild . getAttribute (
304
304
'data-accordion-component' ,
305
305
) === 'AccordionItemButton' ,
@@ -319,7 +319,7 @@ describe('WAI ARIA Spec', () => {
319
319
// Before expanding
320
320
expect (
321
321
await page . evaluate (
322
- button => button . getAttribute ( 'aria-expanded' ) ,
322
+ ( button ) => button . getAttribute ( 'aria-expanded' ) ,
323
323
handle ,
324
324
) ,
325
325
) . toEqual ( 'false' ) ;
@@ -330,7 +330,7 @@ describe('WAI ARIA Spec', () => {
330
330
// After expanding
331
331
expect (
332
332
await page . evaluate (
333
- button => button . getAttribute ( 'aria-expanded' ) ,
333
+ ( button ) => button . getAttribute ( 'aria-expanded' ) ,
334
334
handle ,
335
335
) ,
336
336
) . toEqual ( 'true' ) ;
@@ -351,11 +351,11 @@ describe('WAI ARIA Spec', () => {
351
351
) ;
352
352
353
353
const buttonAriaControls = await page . evaluate (
354
- button => button . getAttribute ( 'aria-controls' ) ,
354
+ ( button ) => button . getAttribute ( 'aria-controls' ) ,
355
355
buttonHandle ,
356
356
) ;
357
357
const panelId = await page . evaluate (
358
- panel => panel . id ,
358
+ ( panel ) => panel . id ,
359
359
panelHandle ,
360
360
) ;
361
361
@@ -375,7 +375,7 @@ describe('WAI ARIA Spec', () => {
375
375
await firstButtonHandle . click ( ) ;
376
376
377
377
const buttonAriaDisabled = await page . evaluate (
378
- button => button . getAttribute ( 'aria-disabled' ) ,
378
+ ( button ) => button . getAttribute ( 'aria-disabled' ) ,
379
379
firstButtonHandle ,
380
380
) ;
381
381
@@ -397,15 +397,15 @@ describe('WAI ARIA Spec', () => {
397
397
) ;
398
398
399
399
const buttonId = await page . evaluate (
400
- button => button . id ,
400
+ ( button ) => button . id ,
401
401
buttonHandle ,
402
402
) ;
403
403
const panelAriaLabelledBy = await page . evaluate (
404
- panel => panel . getAttribute ( 'aria-labelledby' ) ,
404
+ ( panel ) => panel . getAttribute ( 'aria-labelledby' ) ,
405
405
panelHandle ,
406
406
) ;
407
407
const panelRole = await page . evaluate (
408
- panel => panel . getAttribute ( 'role' ) ,
408
+ ( panel ) => panel . getAttribute ( 'role' ) ,
409
409
panelHandle ,
410
410
) ;
411
411
0 commit comments