Field Guide
Document Structure
Document structure covers the two things every page must declare for assistive technology to work at all: a descriptive page title, and the language the page is written in. Without them, a screen reader can't tell users what the page is or pronounce its words correctly.
Why it matters for your site
When a screen reader loads a page, the first thing it announces is the page title — it's how a user confirms they've landed in the right place, and how they tell pages apart when several tabs are open. A missing or duplicated title leaves them disoriented before they've started.
The page's declared language tells a screen reader which voice and pronunciation rules to use. An English page with no language set — or the wrong one — can be read aloud in a French or German accent, mangling every word. It also drives browser translation offers and correct hyphenation.
These are small, one-line declarations with outsized impact: they're foundational to whether a page is usable with assistive technology at all, and both are explicit requirements under WCAG and the accessibility laws that reference it.
How to check it yourself
- Look at the browser tab: it should show a clear, specific title for the page. If it's blank, shows a raw URL, or is identical across different pages, the title needs fixing.
- View the page source and check the opening <html> tag for a lang attribute — for example <html lang="en"> or <html lang="en-GB">. If there's no lang attribute, assistive technology has to guess the language.
- On macOS, turn on VoiceOver and load the page: listen to what it announces first (the title) and whether the words are pronounced in the right language.
- The Kweri audit flags a missing page title and a missing or invalid language declaration in the Accessibility section of your report.
Technical detail
document-title: the page must have a non-empty <title> element in its <head>. Screen readers announce it on load, and it's the label for browser tabs, bookmarks, and history. This maps to WCAG 2.2 Success Criterion 2.4.2 (Page Titled).
html-has-lang: the root <html> element must carry a lang attribute (for example lang="en"). This tells assistive technology which language to render speech in, and supports WCAG 2.2 Success Criterion 3.1.1 (Language of Page).
html-lang-valid: the lang value must be a valid BCP 47 language tag — 'en', 'en-GB', 'fr', and so on. An invalid or made-up value is as unhelpful as none at all, because assistive technology can't map it to a real language. This also supports WCAG 3.1.1.
For the rule detail: documents must have a title, see Deque — document-title rule →
For the rule detail: the <html> element must have a lang attribute, see Deque — html-has-lang rule →
For the rule detail: the lang attribute must have a valid value, see Deque — html-lang-valid rule →
Related
Web accessibility is organised around four principles: content must be Perceivable, Operable, Understandable, and Robust — failure on any one principle makes content inaccessible to some users.
Labels and names are the text that assistive technology reads out when a user encounters a button, link, or form field — without them, screen readers and voice control tools cannot tell users what an interactive element does.
See Document Structure on your own site
Run a free Kweri audit — a plain-English review of your site’s speed, accessibility, SEO and design, ranked by what to fix first. No login, no jargon.
Run a free audit →