[A11Y] [Low] Verify lang attribute is set correctly #41

Open
opened 2026-02-19 20:09:05 +00:00 by continue[bot] · 0 comments
continue[bot] commented 2026-02-19 20:09:05 +00:00 (Migrated from github.com)

Accessibility Issue: Verify HTML lang Attribute

WCAG Level: A (3.1.1 Language of Page)
Severity: Low (likely handled by Hugo/Docsy)
Category: Semantic HTML

Issue Description

The <html> element should have a lang attribute that correctly identifies the primary language of the page. This helps screen readers pronounce content correctly.

User Impact

  • Affected Users: Screen reader users
  • Severity: Incorrect pronunciation of content

Current Configuration

In hugo.yaml:

defaultContentLanguage: en
languages:
  en:
    languageName: English

Hugo should automatically add lang="en" to the HTML element based on this configuration.

Investigation Needed

  1. Build the site and verify the rendered HTML includes <html lang="en">
  2. If not present, may need to customize the base template

Testing Instructions

  1. Build the site: hugo
  2. Check generated HTML in public/index.html
  3. Verify <html lang="en"> is present
  4. Use Lighthouse accessibility audit to verify

Resources

Acceptance Criteria

  • Verify lang attribute is present in rendered HTML
  • Test with screen reader for correct language pronunciation
  • Lighthouse accessibility audit passes for language

## Accessibility Issue: Verify HTML lang Attribute **WCAG Level:** A (3.1.1 Language of Page) **Severity:** Low (likely handled by Hugo/Docsy) **Category:** Semantic HTML ### Issue Description The `<html>` element should have a `lang` attribute that correctly identifies the primary language of the page. This helps screen readers pronounce content correctly. ### User Impact - **Affected Users:** Screen reader users - **Severity:** Incorrect pronunciation of content ### Current Configuration In `hugo.yaml`: ```yaml defaultContentLanguage: en languages: en: languageName: English ``` Hugo should automatically add `lang="en"` to the HTML element based on this configuration. ### Investigation Needed 1. Build the site and verify the rendered HTML includes `<html lang="en">` 2. If not present, may need to customize the base template ### Testing Instructions 1. Build the site: `hugo` 2. Check generated HTML in `public/index.html` 3. Verify `<html lang="en">` is present 4. Use Lighthouse accessibility audit to verify ### Resources - [WCAG 3.1.1 Language of Page](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page.html) - [Hugo Multilingual Mode](https://gohugo.io/content-management/multilingual/) - [MDN: lang attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) ### Acceptance Criteria - [ ] Verify `lang` attribute is present in rendered HTML - [ ] Test with screen reader for correct language pronunciation - [ ] Lighthouse accessibility audit passes for language --- <!-- accessibility-tracker: automated scan 2026-02-19 -->
Sign in to join this conversation.
No description provided.