diff --git a/lib/checks/keyboard/contentinfo-is-top-level.js b/lib/checks/keyboard/contentinfo-is-top-level.js index 1d0b5b66a3..3a62355f2b 100644 --- a/lib/checks/keyboard/contentinfo-is-top-level.js +++ b/lib/checks/keyboard/contentinfo-is-top-level.js @@ -1,6 +1,6 @@ const landmarks = axe.commons.aria.getRolesByType('landmark'); const sectioning = ['article', 'aside', 'main', 'navigation', 'section']; -const nodeIsHeader = node.tagName.toLowerCase() === 'footer' && node.getAttribute('role') !== 'contentinfo'; +const nodeIsFooter = node.tagName.toLowerCase() === 'footer' && node.getAttribute('role') !== 'contentinfo'; var parent = axe.commons.dom.getComposedParent(node); while (parent){ @@ -8,7 +8,7 @@ while (parent){ if (!role && (parent.tagName.toLowerCase() !== 'form')){ role = axe.commons.aria.implicitRole(parent); } - if (role && nodeIsHeader && sectioning.includes(role)){ + if (role && nodeIsFooter && sectioning.includes(role)){ return true; } if (role && landmarks.includes(role)){