Accessibility Best Practices

Landmarks, form labels, heading order, skip navigation, and tab index — how Hugo evaluates web accessibility compliance.

Hugo Team·March 12, 2026
accessibilitya11ylandmarksariaform labelsheading orderskip navwcag

Web accessibility ensures your site is usable by everyone, including people using screen readers, keyboard navigation, or other assistive technologies.[1] While accessibility overlaps with SEO in many areas, Hugo runs 8 dedicated accessibility checks worth 12% of your main page score.

Page Landmark Regions
<header><nav><main><footer>

Landmark Regions

HTML5 landmarks (<main>, <nav>, <header>, <footer>) help screen readers navigate your page structure.[2] Hugo checks for two critical landmarks:

  • Main landmark — <main> or role="main" marks the primary content area. Missing this is a warning.[2]
  • Navigation landmark — <nav> or role="navigation" identifies navigation sections. Missing is an info notice.

Form Labels

Every form input should have an associated label.[3] Hugo checks all <input>, <select>, and <textarea> elements (excluding hidden, submit, button, and image types) for proper labeling through <label> elements, aria-label, or aria-labelledby attributes.

Heading Order

Screen readers use heading levels to build a page outline.[4] Skipping levels (e.g., H1 → H3) breaks this outline and confuses assistive technology users. Hugo checks that heading levels follow a sequential order without gaps.

Skip Navigation

Skip navigation links allow keyboard users to jump directly to the main content without tabbing through every navigation item.[5] Hugo detects skip links by looking for internal anchors (href starting with #) in the first few elements of the page.

Tab Index

Positive tabindex values (tabindex="1", tabindex="5") break the natural DOM tab order and create confusion for keyboard users. Hugo flags these as warnings — use tabindex="0" to add elements to the natural tab order, or tabindex="-1" to remove them.[5]

ℹ️WCAG Connection

Many of these checks align with WCAG 2.1 Level A and AA success criteria.[1] Passing Hugo's accessibility checks puts you on the path to WCAG compliance, though a full audit requires additional testing.

References

  1. [1]W3C — Web Content Accessibility Guidelines (WCAG) 2.1 Overview — w3.org
  2. [2]W3C WAI — Page Structure: Page Regions — w3.org
  3. [3]W3C WAI — Forms: Labeling Controls — w3.org
  4. [4]W3C WAI — Page Structure: Headings — w3.org
  5. [5]W3C WAI — Keyboard Techniques — w3.org

We value your privacy

We use localStorage to keep you signed in. No tracking cookies are set. Read our Cookie Policy and Privacy Policy for details.