Add accessilbilty check and fixes
Some checks failed
/ build (push) Successful in 15s
/ accessibility (push) Failing after 23s

This commit is contained in:
Stefan Bethke 2026-10-17 10:03:54 +02:00
commit 71098eb6d7
13 changed files with 132 additions and 29 deletions

View file

@ -49,4 +49,19 @@ Wide screens get one column per day on an hour grid, with tours that start at th
For a different event than the page's section, pass its name: `{{< schedule 39c3 >}}`.
Without a data file, or without any tours in it, the shortcode renders nothing and the build logs a warning. To silence it, for example for an upcoming event, add `warning-schedule-empty` to `ignoreLogs` in `hugo.yaml`.
Without a data file, or without any tours in it, the shortcode renders nothing and the build logs a warning. To silence it, for example for an upcoming event, add `warning-schedule-empty` to `ignoreLogs` in `hugo.yaml`.
## Accessibility check
CI runs [pa11y-ci](https://github.com/pa11y/pa11y-ci) with the axe and HTML_CodeSniffer rules for WCAG 2 AA on every push and pull request, in its own job (`accessibility`), so findings show up without blocking the deploy. To run the same check locally (needs Node.js, Python 3 and Chrome or Chromium):
```shell
./scripts/pa11y.sh
```
The script builds the site, serves it on `localhost:8080` and checks every page in the sitemaps, except the past events and the individual news posts, which are kept as they were. The list of skipped sections is `EXCLUDE` in [scripts/pa11y.sh](scripts/pa11y.sh); the rules are in [.pa11yci.json](.pa11yci.json). pa11y only checks the light colour scheme.
Some things to keep in mind when writing pages:
- Give every image an alt text that says what it shows. The image title is the photo credit (`![Alt text](photo.jpg "© Photographer")`); it is shown below the image.
- Headings in a page start at `##`; `#` is the page title.
- Don't put information only into images, like directions on a map; write it out as text as well.