Page MenuHomeFreeBSD

Fix HTML validation errors in docs - on main page
ClosedPublic

Authored by vladlen on Sun, Sep 27, 1:59 PM.

Details

Summary

Problem

The homepage renders nine card titles as <h5>, right after the
<h2> from global-search.html, skipping two heading levels. This
fails W3C validation and confuses screen reader navigation.

The page also has no <h1>.

Changes

  • index.html: add a visually hidden <h1>{{ .Title }}</h1> before the search partial.
  • index.html: replace <h5> with <h3 class="card-title"> in all nine cards.
  • global.scss: rename the .card a h5 selector to .card a .card-title, keep its properties, and set padding-top and padding-bottom so the new <h3> keeps the previous look.
  • global.scss: add .visually-hidden.

Rationale

The <h2> inside global-search.html is used on other pages that
already have an <h1>, so it is intentionally left unchanged.
Card titles are subsections of the homepage, and <h3> matches
their position in the hierarchy.

  • Homepage cards look identical to before.

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

vladlen created this revision.
This revision is now accepted and ready to land.Sun, Sep 27, 2:54 PM