diff --git a/lib/commons/dom/has-content-virtual.js b/lib/commons/dom/has-content-virtual.js index eb5e9b9d69..4a91344da2 100644 --- a/lib/commons/dom/has-content-virtual.js +++ b/lib/commons/dom/has-content-virtual.js @@ -39,7 +39,7 @@ dom.hasContentVirtual = function(elm, noRecursion, ignoreAria) { // It is a graphical element dom.isVisualContent(elm.actualNode) || // It has an ARIA label - (!!ignoreAria || !!aria.labelVirtual(elm)) || + (!ignoreAria && !!aria.labelVirtual(elm)) || // or one of it's descendants does (!noRecursion && elm.children.some( diff --git a/test/commons/dom/has-content-virtual.js b/test/commons/dom/has-content-virtual.js index acebe380b5..cb84e322e7 100644 --- a/test/commons/dom/has-content-virtual.js +++ b/test/commons/dom/has-content-virtual.js @@ -41,7 +41,7 @@ describe('dom.hasContentVirtual', function() { it('is false if the element has an aria label but `ignoreAria=true`', function() { fixture.innerHTML = '