File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,13 @@ const pureInteractiveRoleElements = [...elementRoles.entries()]
43
43
elementAttributes . length === 0 ||
44
44
elementAttributes . every (
45
45
( controlAttr ) : boolean => attributes . some (
46
- ( attr ) : boolean => (
47
- controlAttr . name === propName ( attr ) . toLowerCase ( )
48
- && controlAttr . value === getLiteralPropValue ( attr )
49
- ) ,
46
+ ( attr ) : boolean => {
47
+ if ( attr . type !== 'JSXAttribute' ) {
48
+ return false ;
49
+ }
50
+ return controlAttr . name === propName ( attr ) . toLowerCase ( )
51
+ && controlAttr . value === getLiteralPropValue ( attr ) ;
52
+ } ,
50
53
) ,
51
54
) ;
52
55
// [].some is used here because some elements are associated with both
Original file line number Diff line number Diff line change @@ -44,10 +44,13 @@ const pureNonInteractiveElements = [...elementRoles.entries()]
44
44
elementAttributes . length === 0 ||
45
45
elementAttributes . every (
46
46
( controlAttr ) : boolean => attributes . some (
47
- ( attr ) : boolean => (
48
- controlAttr . name === propName ( attr ) . toLowerCase ( )
49
- && controlAttr . value === getLiteralPropValue ( attr )
50
- ) ,
47
+ ( attr ) : boolean => {
48
+ if ( attr . type !== 'JSXAttribute' ) {
49
+ return false ;
50
+ }
51
+ return controlAttr . name === propName ( attr ) . toLowerCase ( )
52
+ && controlAttr . value === getLiteralPropValue ( attr ) ;
53
+ } ,
51
54
) ,
52
55
) ;
53
56
return passedAttrCheck && [ ...roleSet . keys ( ) ] . every (
You can’t perform that action at this time.
0 commit comments