Skip to content

Commit

Permalink
refactor: change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
sulsanaul authored and WilcoFiers committed Mar 7, 2018
1 parent 5692e7d commit 7b66768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/checks/keyboard/contentinfo-is-top-level.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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){
var role = parent.getAttribute('role');
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)){
Expand Down

0 comments on commit 7b66768

Please sign in to comment.