File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -583,26 +583,32 @@ Rule.prototype.after = function after(result, options) {
583
583
// only add the node property for the check.after so we can
584
584
// look at which iframe a check result came from, but we don't
585
585
// want it for the final results object
586
- if ( item . data . metaData ) {
586
+ if ( check . id === 'sub-menu-metadata' ) {
587
+ if ( item . data . metaData ) {
588
+ delete item . node ;
589
+ item . result = true ;
590
+ }
591
+ } else {
587
592
delete item . node ;
588
- item . result = true ;
589
593
}
590
594
if ( afterResults . indexOf ( item ) === - 1 ) {
591
595
item . filtered = true ;
592
596
}
593
597
} ) ;
594
598
} ) ;
595
599
596
- // Sub menu nodes modifications
597
- const data = result . nodes . filter ( ( r ) => ! r . all [ 0 ] . result ) ;
598
- data . forEach ( ( r ) => {
599
- const node = r . all [ 0 ] . data ;
600
- r . node = new axe . utils . DqElement ( node ) ;
601
- } ) ;
600
+ // Trying for sub-menu
601
+ if ( result . id === 'sub-menu-metadata' ) {
602
+ const data = result . nodes . filter ( ( r ) => ! r . all [ 0 ] . result ) ;
603
+ data . forEach ( ( r ) => {
604
+ const node = r . all [ 0 ] . data ;
605
+ r . node = new axe . utils . DqElement ( node ) ;
606
+ } ) ;
602
607
603
- result . nodes . forEach ( ( r ) => {
604
- delete r . all [ 0 ] . data ;
605
- } ) ;
608
+ result . nodes . forEach ( ( r ) => {
609
+ delete r . all [ 0 ] . data ;
610
+ } ) ;
611
+ }
606
612
607
613
result . nodes = sanitizeNodes ( result ) ;
608
614
return result ;
You can’t perform that action at this time.
0 commit comments