Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/main/actions/check…
Browse files Browse the repository at this point in the history
…out-4
  • Loading branch information
ttsukagoshi authored Jan 28, 2024
2 parents 2a505d1 + ee70081 commit 2844db5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/a11y_alt_text_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
if: ${{ github.event.issue || github.event.pull_request || github.event.discussion }}
steps:
- name: Get action 'github/accessibility-alt-text-bot'
uses: github/accessibility-alt-text-bot@v1.2.0 # Set to latest
uses: github/accessibility-alt-text-bot@v1.3.0 # Set to latest

8 changes: 7 additions & 1 deletion src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default async function (options: CommandOption): Promise<void> {
const urls: string[] = fs
.readFileSync(filePath /*, { encoding: config.encoding }*/)
.toString()
.trim()
.replace(/\r?\n/g, ',')
.split(',');

Expand All @@ -71,7 +72,12 @@ export default async function (options: CommandOption): Promise<void> {
let outputText: string = raw ? '' : REPORT_HEADER.join();
const rawAxeResults: RawAxeResults = {};
for (let i = 0; i < urls.length; i++) {
const url: string = urls[i];
const url: string = urls[i].trim();

if (!url) {
continue;
}

const page: puppeteer.Page = await browser.newPage();
await page.setBypassCSP(true);
/* Emulate device: left here as a potential option for the future
Expand Down

0 comments on commit 2844db5

Please sign in to comment.