Skip to content

Tighten HTML5 validation in site-health CI #37

@jmxpearson

Description

@jmxpearson

Summary

The Validate HTML step in .github/workflows/site-health.yml is currently continue-on-error: true — it runs and reports HTML5 spec issues to the workflow log but doesn't gate PRs. This was a pragmatic call in PR #32 because the Bootstrap-3-era templates produce a large volume of warnings, and triaging the .html5validator.yaml ignore list was out of scope.

Two paths (pick one)

Option A: Tighten via ignore list

  1. Run html5validator --root _site --config .html5validator.yaml locally and dump the output.
  2. Categorize errors: which are legitimate Bootstrap-3-era idioms (role="..." on certain elements, deprecated attributes, etc.) vs. real bugs?
  3. Add regex patterns to .html5validator.yaml's ignore_re: list for the legitimate ones.
  4. Fix the real bugs.
  5. Flip continue-on-error: false so future template regressions get caught.

Pros: cheap, immediate signal on contributor changes.
Cons: ignore list will need maintenance.

Option B: Modernize templates

Rewrite _layouts/, _includes/, and hand-written HTML pages (people.html, publications.html) to pass HTML5 strict mode without an ignore list. Pairs naturally with a Bootstrap 3 → 5 upgrade if the lab decides to take that on (the original site-improvement report flagged this as a "low migration risk; afternoon of work" item).

Pros: eliminates the warning class entirely, modernizes the site CSS.
Cons: bigger lift, touches presentation.

Acceptance

Whichever option:

  • bundle exec jekyll build && html5validator --root _site --config .html5validator.yaml exits clean locally
  • Set continue-on-error: false on the Validate HTML step (or remove the property)
  • Push a deliberate HTML error (e.g., unclosed tag) to a branch and confirm the check fails on it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions