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) {
583583 // only add the node property for the check.after so we can
584584 // look at which iframe a check result came from, but we don't
585585 // 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 {
587592 delete item . node ;
588- item . result = true ;
589593 }
590594 if ( afterResults . indexOf ( item ) === - 1 ) {
591595 item . filtered = true ;
592596 }
593597 } ) ;
594598 } ) ;
595599
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+ } ) ;
602607
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+ }
606612
607613 result . nodes = sanitizeNodes ( result ) ;
608614 return result ;
You can’t perform that action at this time.
0 commit comments