This page is in progress -
Why This is Important
The correct language attribute ensures that screen readers process the content in the intended language.
Blind and visually impaired people use screen readers to interact with websites and apps. A screen reader is a type of assistive tech that converts text, buttons, and other screen elements to audio and/or braille. If you are new to screen readers, I recommend watching a video to learn how it works.
In order to ensure the screen reader user experiences content in the intended language, the human language attribute must be correctly labeled.
How to Implement This
Language of the Page
Add the language attribute to each page with the correct language code.
<p>It's a beautiful day to not wear pants.</p>
Language of Phrases and Passages
For individual phrases and passages that differ from the page language, use the span element.
<p>Hungarians refer to themselves as <span lang="hu">magyarok</span>.</p>
Note on "Programmatically Determined"
WCAG often uses the phrase "programmatically determined" to mean that an element is defined in markup (HTML) and therefore available for assistive tech to access. I use the term "defined in markup" instead because I find it more simple and understandable. Just keep this in mind when reading WCAG source material.
How to Test This
Contribute and Give Feedback
If you would like to provide feedback or contribute content on this resource, please fill out the form below.