diff --git a/lib/commons/aria/label.js b/lib/commons/aria/label.js index f9d14849e1..a3bbbfb655 100644 --- a/lib/commons/aria/label.js +++ b/lib/commons/aria/label.js @@ -8,8 +8,8 @@ aria.label = function (node) { var ref, candidate; if (node.actualNode instanceof Node === false) { - node = axe.utils.getNodeFromTree(axe._tree[0], node); - } + node = axe.utils.getNodeFromTree(axe._tree[0], node); + } if (node.actualNode.getAttribute('aria-labelledby')) { // aria-labelledby diff --git a/test/checks/tables/td-has-header.js b/test/checks/tables/td-has-header.js index df245d2af8..92accbdaff 100644 --- a/test/checks/tables/td-has-header.js +++ b/test/checks/tables/td-has-header.js @@ -2,7 +2,7 @@ describe('td-has-header', function () { 'use strict'; var fixture = document.getElementById('fixture'); - var shadowSupport = (document.body && typeof document.body.attachShadow === 'function'); + var shadowSupport = axe.testUtils.shadowSupport.v1; var checkContext = { _relatedNodes: [], _data: null, diff --git a/test/checks/tables/th-has-data-cells.js b/test/checks/tables/th-has-data-cells.js index 8ffe5e9b32..8f0703cfaf 100644 --- a/test/checks/tables/th-has-data-cells.js +++ b/test/checks/tables/th-has-data-cells.js @@ -2,7 +2,7 @@ describe('th-has-data-cells', function () { 'use strict'; var fixture = document.getElementById('fixture'); - var shadowSupport = (document.body && typeof document.body.attachShadow === 'function'); + var shadowSupport = axe.testUtils.shadowSupport.v1; var checkContext = { _relatedNodes: [], _data: null,