Skip to content

Commit

Permalink
Add tables with figcaption now has() is supported (HTTPArchive#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
tunetheweb authored Sep 13, 2022
1 parent 770291b commit 69c0bd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dist/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ return JSON.stringify({
tables: captureAndLogError(() => {
const tables = document.querySelectorAll('table');
const tables_with_caption = document.querySelectorAll('table caption');
const tabels_with_presentational = document.querySelectorAll('table[role="presentation" i]');
const tables_with_presentational = document.querySelectorAll('table[role="presentation" i]');
const tables_with_figcaption = document.querySelectorAll('figure:has(table):has(figcaption)');

return {
total: tables.length,
total_with_caption: tables_with_caption.length,
total_with_presentational: tabels_with_presentational.length,
total_with_presentational: tables_with_presentational.length,
total_with_figcaption: tables_with_figcaption.length
};
}),
file_extension_alts: captureAndLogError(() => {
Expand Down

0 comments on commit 69c0bd9

Please sign in to comment.