Skip to content

Commit

Permalink
Merge branch 'tdHeadersAttr' of https://github.com/dequelabs/axe-core
Browse files Browse the repository at this point in the history
…into tdHeadersAttr
  • Loading branch information
straker committed Mar 12, 2020
2 parents c79389a + bf86db8 commit 4e248cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/checks/tables/td-headers-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const ids = cells.reduce((ids, cell) => {
}, []);

cells.forEach(cell => {
let isSelf, notOfTable;
let isSelf = false;
let notOfTable = false;

if (!cell.hasAttribute('headers')) {
return;
Expand All @@ -39,7 +40,7 @@ cells.forEach(cell => {
}

// Check if the headers are of cells inside the table
notOfTable = headers.find(header => !ids.includes(header));
notOfTable = headers.some(header => !ids.includes(header));

if (isSelf || notOfTable) {
badCells.push(cell);
Expand Down

0 comments on commit 4e248cf

Please sign in to comment.