File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import getSuggestion from '../../../src/util/getSuggestion';
19
19
// -----------------------------------------------------------------------------
20
20
21
21
const ruleTester = new RuleTester ( ) ;
22
- const ariaAttributes = aria . keys ( ) ;
22
+ const ariaAttributes = [ ... aria . keys ( ) ] ;
23
23
24
24
const errorMessage = ( name ) => {
25
25
const suggestions = getSuggestion ( name , ariaAttributes ) ;
Original file line number Diff line number Diff line change @@ -39,14 +39,15 @@ const isSemanticRoleElement = (
39
39
) ,
40
40
)
41
41
) {
42
- for ( let k = 0 ; k < axObjects . length ; k += 1 ) {
43
- const roles = AXObjectRoles . get ( axObjects [ k ] ) ;
42
+ return axObjects . some ( ( obj ) => {
43
+ const roles = AXObjectRoles . get ( obj ) ;
44
44
if ( roles && roles . some (
45
45
( role ) => role . name === roleAttrValue ,
46
46
) ) {
47
47
return true ;
48
48
}
49
- }
49
+ return false ;
50
+ } ) ;
50
51
}
51
52
}
52
53
return false ;
You can’t perform that action at this time.
0 commit comments