Language

Language attributes for accessibility.

Follow these recommendations to improve the experience for visitors who may take advantage of translations.

  1. <html> element has a [lang] attribute: If a page doesn’t specify a lang attribute, a screen reader assumes that the page is in the default language that the user chose when setting up the screen reader. If the page isn’t actually in the default language, then the screen reader might not announce the page’s text correctly.

  2. <html> element has a valid value for its [lang] attribute: Specifying a valid BCP 47 language helps screen readers announce text properly.

  3. <html> element has an [xml:lang] attribute with the same base language as the [lang] attribute: If the webpage does not specify a consistent language, then the screen reader might not announce the page’s text correctly.

  4. [lang] attributes have a valid value: Specifying a valid BCP 47 language on elements helps ensure that text is pronounced correctly by a screen reader.

Related

Topics

On this page

Supporters

Thank you to these organizations for supporting Project ScanGov:

ScanGov

Government. Digital. Experience.

Get ScanGov