Skip to content

Commit

Permalink
chore: Fix merge issue with isFocusable
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoFiers committed Dec 15, 2017
1 parent 1ab4629 commit 08af138
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/checks/navigation/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const implicitLandmarks = landmarkRoles

function isSkipLink(n) {
return firstLink &&
axe.commons.dom.isFocusable(axe.commons.dom.getElementByReference(firstLink, 'href')) &&
axe.commons.dom.getElementByReference(firstLink, 'href') &&
firstLink === n;
}

Expand Down
3 changes: 2 additions & 1 deletion lib/checks/navigation/skip-link.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
return axe.commons.dom.isFocusable(axe.commons.dom.getElementByReference(node, 'href'));
const target = axe.commons.dom.getElementByReference(node, 'href');
return !!target && axe.commons.dom.isFocusable(target);
4 changes: 2 additions & 2 deletions lib/commons/dom/is-focusable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global dom */
/* global console, dom */
/* jshint maxcomplexity: 20 */
/**
* Determines if an element is focusable
Expand All @@ -11,7 +11,7 @@

dom.isFocusable = function (el) {
'use strict';

console.log(el);
if (dom.isNativelyFocusable(el)) {
return true;
}
Expand Down

0 comments on commit 08af138

Please sign in to comment.