diff --git a/assets/js/tables.js b/assets/js/tables.js index 91af4bd..282c248 100644 --- a/assets/js/tables.js +++ b/assets/js/tables.js @@ -12,10 +12,11 @@ tables.forEach(function (table) { const headers = table.querySelectorAll('th'); - const rows = table.querySelectorAll('tr:has(td)'); + const rows = table.querySelectorAll('tbody tr'); rows.forEach(function (row) { const cells = row.querySelectorAll('td'); + cells.forEach(function (cell, i) { cell.setAttribute('role','cell'); if (headers[i].innerText) { @@ -25,5 +26,4 @@ }); }); - })();