From 1ff2007067e357203fc473be99bc89be1596d161 Mon Sep 17 00:00:00 2001 From: Vladlen Popolitov Date: Sun, 27 Sep 2026 18:46:45 +0300 Subject: Fix HTML validation errors in docs - on main page Card titles on the documentation homepage were rendered as
right after the

from global-search.html, skipping two heading levels. The page also had no

. Add a visually hidden

{{ .Title }}

before the search partial, render card titles as

, and rename the .card a h5 selector to .card a .card-title with padding-top and padding-bottom set, so the look stays the same. Add a .visually-hidden helper to global.scss. Differential Revision: https://reviews.freebsd.org/D60069 PR: 297509 --- .../themes/beastie/assets/styles/global.scss | 16 +++++++++++++++- documentation/themes/beastie/layouts/index.html | 19 ++++++++++--------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/documentation/themes/beastie/assets/styles/global.scss b/documentation/themes/beastie/assets/styles/global.scss index 88554f711e..17a496ffd0 100644 --- a/documentation/themes/beastie/assets/styles/global.scss +++ b/documentation/themes/beastie/assets/styles/global.scss @@ -141,12 +141,14 @@ body { flex-direction: column; text-decoration: none; - h5 { + .card-title { color: var(--global-font-color); font-weight: 700; font-size: 22px; margin: 0px 0px 8px 0px; border-bottom: 0px; + padding-top: 0.1rem; + padding-bottom: 0.5rem; } p { @@ -213,6 +215,18 @@ ul.language-list { font-weight: 700; } +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + h1, h2, h3, diff --git a/documentation/themes/beastie/layouts/index.html b/documentation/themes/beastie/layouts/index.html index 3789a3d1b0..7ae440920f 100644 --- a/documentation/themes/beastie/layouts/index.html +++ b/documentation/themes/beastie/layouts/index.html @@ -8,59 +8,60 @@ {{ $downloadurl = printf "%s/%s/" $.Site.Params.websiteURL "where" }} {{ end }}
+

{{ .Title }}

{{ partial "global-search.html" . }}
-- cgit v1.3