feat: add CI workflow for accessibility and syntax validation #52
Reference in New Issue
Block a user
Delete Branch "feat/ci-a11y-checks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR introduces a Gitea Actions workflow for
the-beaconthat enforces accessibility standards. It usesgrepto ensure that critical ARIA attributes and roles are present in the codebase and performs a basic syntax check ongame.js.Approved.
Approved — CI fixes merged, re-running.
This workflow will fail on
mainthe moment it runs. I grep-checked the current codebase:Zero ARIA attributes exist anywhere. The CI would immediately report
ERROR: aria-label missing from game.jsand block every PR until someone adds accessible markup. If the goal is to land accessibility, this PR is the wrong order — you'd need the markup PR first, then the enforcement CI.Separately, the check itself is weak even if the markup existed:
grep -q 'aria-label'matches the literal string anywhere in the file, including a comment// TODO: add aria-label. Trivially bypassable.aria-valuenowandaria-pressedare only meaningful on specific role types (progressbar, toggle button). A blanket presence check doesn't verify they're applied to the right elements.Suggested path:
index.html(and any DOM-generating code ingame.js). PR B: the CI workflow, but using a real linter —pa11y-ci,axe-core/cli, orhtml-validatewith accessibility rules enabled. All three run headlessly and give structured, actionable output.index.htmland runaxe.run(), failing on violations of a specific severity. That's ~15 lines and gives real signal.The
node -c game.jsstep at the end is fine and should probably move into PR #53's smoke workflow so there's one canonical parse-check job.