diff --git a/lib/custom_a11y_rules.js b/lib/custom_a11y_rules.js index 54e53cb..e069d14 100644 --- a/lib/custom_a11y_rules.js +++ b/lib/custom_a11y_rules.js @@ -172,9 +172,9 @@ var customRules = { rel = node.getAttribute('rel') || ''; if (href.startsWith('#') && href.length > 1 && rel !== 'leanModal') { linkTarget = document.querySelector(href); - console.log("linkTarget: " + linkTarget) - console.log(node) - console.log(options) + if (!linkTarget) { + return false; + } return axe.commons.dom.isFocusable(linkTarget); } else { return true;