Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/main/eslint-8.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ttsukagoshi authored Jan 28, 2024
2 parents e6b60d9 + ee70081 commit bdacc91
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 bdacc91

Please sign in to comment.