Skip to content

Commit

Permalink
One more
Browse files Browse the repository at this point in the history
  • Loading branch information
kodster28 committed Aug 31, 2023
1 parent c7dd22e commit e9ac25e
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions bin/accessibility-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,32 @@ async function checkLinks() {
continue; // Skip if the link is in a certain section
}

let pages;
pages = [await browser.newPage(), await browser.newPage()];

pages.forEach(async function (value, index) {
let result;
if (index === 0) {
result = await pa11y(link, {
browser,
page: value,
runners: ["axe", "htmlcs"],
});
} else {
result = await pa11y(link, {
browser,
page: value,
runners: ["axe", "htmlcs"],
actions: [
'click element #ThemeToggle',
]
});
}
console.log(result)
const page1 = await browser.newPage();
let result1 = await pa11y(link, {
browser,
page: value,
runners: ["axe", "htmlcs"],
});
console.log(result1)
await page1.close();

const page2 = await browser.newPage();
let result2 = await pa11y(link, {
browser,
page: value,
runners: ["axe", "htmlcs"],
actions: [
'click element #ThemeToggle',
'wait for element #DocsSidebar:before to be added'
]
});
console.log(result2)
await page2.close();
/* for (const issue of result.issues) {
if (!resultsArray.contains(issue)) {
resultsArray.push(issue);
}
} */

await value.close();
});
}
await page.close();
await browser.close();
Expand Down

0 comments on commit e9ac25e

Please sign in to comment.