git: bda5cd5fa9 - main - Website: Fix HTML validation errors

From: Vladlen Popolitov <vladlen_at_FreeBSD.org>
Date: Sat, 26 Sep 2026 14:18:55 UTC
The branch main has been updated by vladlen:

URL: https://cgit.FreeBSD.org/doc/commit/?id=bda5cd5fa94654a1542d1beaa1f62a31b12d630a

commit bda5cd5fa94654a1542d1beaa1f62a31b12d630a
Author:     Vladlen Popolitov <vladlen@FreeBSD.org>
AuthorDate: 2026-09-26 14:18:49 +0000
Commit:     Vladlen Popolitov <vladlen@FreeBSD.org>
CommitDate: 2026-09-26 14:18:49 +0000

    Website: Fix HTML validation errors
    
    Remove the <a> wrapper around each <label> in the top-level menu,
    which triggered HTML validation error on every documentation page.
    
    Extend the .menu-item a rules to .menu-item-description so the label
    keeps the same appearance and the sub-menu hover trigger still works.
    
    Mirrors the website fix in a8654f311.
    
    Reviewed by: carlavilla
    Approved by: carlavilla
    Differential Revision: https://reviews.freebsd.org/D60039
    PR: 297509
---
 .../themes/beastie/assets/styles/header.scss       |  5 +++
 .../beastie/layouts/_partials/site-header.html     | 40 +++++++++-------------
 2 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/documentation/themes/beastie/assets/styles/header.scss b/documentation/themes/beastie/assets/styles/header.scss
index e4b6c4a397..4362c46da0 100644
--- a/documentation/themes/beastie/assets/styles/header.scss
+++ b/documentation/themes/beastie/assets/styles/header.scss
@@ -95,18 +95,21 @@ input[type='checkbox'] {
   margin-top: 0px !important;
 }
 
+.menu-item-description,
 .menu-item a {
   padding: 1rem 0;
   color: inherit;
 }
 
 .menu-item a,
+.menu-item-description,
 .donate a {
   text-decoration: none;
   font-weight: 600;
 }
 
 .menu-item a:hover,
+.menu-item-description:hover,
 .donate a:hover {
   text-decoration: none;
 }
@@ -136,6 +139,7 @@ input[type='checkbox'] {
   visibility: visible;
 }
 
+.menu-item-description:hover+.sub-menu,
 .menu-item a:hover+.sub-menu {
   visibility: visible;
 }
@@ -257,6 +261,7 @@ input[type='checkbox'] {
     width: 100%;
   }
 
+  .menu-item-description:hover+.sub-menu,
   .menu-item a:hover+.sub-menu {
     visibility: visible;
   }
diff --git a/documentation/themes/beastie/layouts/_partials/site-header.html b/documentation/themes/beastie/layouts/_partials/site-header.html
index 642ca7e468..aa8c24f5cf 100755
--- a/documentation/themes/beastie/layouts/_partials/site-header.html
+++ b/documentation/themes/beastie/layouts/_partials/site-header.html
@@ -17,12 +17,10 @@
       <ul class="menu">
         <li class="menu-item">
           <input id="about" type="checkbox" />
-          <a href="#" aria-label="Navigate to About section">
-            <label class="menu-item-description" for="about">
-              {{ i18n "h-about" }}
-              <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
-            </label>
-          </a>
+          <label class="menu-item-description" for="about">
+            {{ i18n "h-about" }}
+            <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
+          </label>
           <ul class="sub-menu">
             <li class="title"><a href="https://www.freebsd.org/about/" target="_blank">{{ i18n "h-about" }}</a></li>
             <li><a href="https://www.freebsd.org/about/" target="_blank">{{ i18n "h-freebsd" }}</a></li>
@@ -32,12 +30,10 @@
         </li>
         <li class="menu-item">
           <input id="download" type="checkbox" />
-          <a href="#" aria-label="Navigate to get FreeBSD section">
-            <label class="menu-item-description" for="download">
-              {{ i18n "h-get-freebsd" }}
-              <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
-            </label>
-          </a>
+          <label class="menu-item-description" for="download">
+            {{ i18n "h-get-freebsd" }}
+            <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
+          </label>
           <ul class="sub-menu">
             <li class="title"><a href="https://www.freebsd.org/where/" target="_blank">{{ i18n "h-get-freebsd" }}</a></li>
             <li><a href="https://www.freebsd.org/releases/" target="_blank">{{ i18n "h-release-information" }}</a></li>
@@ -47,12 +43,10 @@
         </li>
         <li class="menu-item">
           <input id="documentation" type="checkbox" />
-          <a href="#" aria-label="Navigate to get Documentation section">
-            <label class="menu-item-description" for="documentation">
-              {{ i18n "h-documentation" }}
-              <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
-            </label>
-          </a>
+          <label class="menu-item-description" for="documentation">
+            {{ i18n "h-documentation" }}
+            <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
+          </label>
           <ul class="sub-menu">
             <li class="title"><a href="{{ .Site.BaseURL | relLangURL }}">{{ i18n "h-documentation-portal" }}</a></li>
             <li><a href={{ "books/handbook" | absLangURL }}>{{ i18n "h-freebsd-handbook" }}</a></li>
@@ -67,12 +61,10 @@
         </li>
         <li class="menu-item">
           <input id="community" type="checkbox" />
-          <a href="#" aria-label="Navigate to get Community section">
-            <label class="menu-item-description" for="community">
-              {{ i18n "h-community" }}
-              <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
-            </label>
-          </a>
+          <label class="menu-item-description" for="community">
+            {{ i18n "h-community" }}
+            <i class="fa fa-angle-down fa-lg" aria-hidden="true"></i>
+          </label>
           <ul class="sub-menu">
             <li class="title"><a href="https://www.freebsd.org/community/">{{ i18n "h-community" }}</a></li>
             <li><a href={{ "articles/contributing" | absLangURL }}>{{ i18n "h-get-involved" }}</a></li>