Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Pa11y CI checks pages without the site's own CSS

Open Beginner friendly
#192 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, html

Research direction

The Pa11y job in .github/workflows/ci.yml passes built files from _site to pa11y as file paths, and the run_pa11y function turns each find result into that path. Start by reading both, then serve _site over HTTP in the job and build http://localhost:4000/... URLs from the same find output. Done when Pa11y runs against pages that load /assets/css/custom.css and the workflow still passes or reports real contrast findings.

Written by the indexing model from the issue text.

Description

accessibility

Summary

The Pa11y job in .github/workflows/ci.yml runs on built files straight from disk (pa11y "$file" where $file is _site/…/index.html). Opened that way, site-relative URLs like /assets/css/custom.css resolve to file:///assets/css/custom.css, which doesn't exist. So Pa11y has never loaded custom.css.

Until now Pico still loaded, because it came from jsDelivr with a full https:// URL. Self-hosting Pico (#182) moves it to /assets/css/ too. After that, Pa11y checks completely unstyled pages, and its colour-contrast results stop meaning anything. It will probably report fewer problems than are really there.

The same applies to /assets/js/*, so Pa11y also never runs the site's JavaScript.

Suggested fix

Serve _site over HTTP in the job and point Pa11y at URLs:

- run: |
    npx --yes http-server _site -p 4000 -s &
    npx --yes wait-on http://localhost:4000

Then have run_pa11y build http://localhost:4000/<subdir>/ from the find result instead of using the file path. This may turn up contrast findings Pa11y has been missing, such as #184.


Generated by Claude Code

Dominant language
HTML
Stars
1
Forks
6
Avg merge
4h 28m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CivicTechTO/civictech.ca

All issues in CivicTechTO/civictech.ca

Similar issues

More Accessibility issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.