User Tools

Site Tools


accessibility:lang

Language Attributes, Multilingual Content, and Screen Reader Pronunciation

Each page must have a primary language set via the lang attribute on the <html> tag. Any changes in language within the page should be marked using additional lang attributes on the surrounding HTML tag to ensure that screen readers pronounce things in the correct language. Without this attribute, all words will be pronounced using the primary language’s accent.

See #2001720 Add language attributes to display fields for screen reader support

While accessibility guidelines state that regional variants (such as a change from American to British English) should be marked accordingly, in practice most users prefer not to hear their screen reader switch accents unexpectedly. It’s therefore best to stick to the two-letter language code rather than the more specific four-letter variation unless the four-letter code is necessary to distinguish significant differences (as with Chinese languages) or there is another excellent reason to force an accent change.

Pronouncing date/time, names, acronyms, and abbreviations

Note that some things, like dates, names, and acronyms, may be pronounced in unwanted ways despite proper lang attributes. This is normal, and you should not attempt to override the screen reader’s pronunciation.

accessibility/lang.txt · Last modified: 2024/04/24 19:00 by lhernandez

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.