Skip to main content
Version: v6

Element has an unrecognized lang attribute

Element has an unrecognized lang attribute — rule summary
FieldValue
Rule codeText_Attribute_Lang_Invalid
WCAG conformance levelA
WCAG success criterion3.1.2 Language of Parts
Must be fixed at sourceNo

Description

The detected element has a value in the lang attribute that does not match a list of ISO 639 language-codes. Lang attributes must have valid ISO language code values. This is achieved by adding an appropriate ISO language-code to the lang attribute of the corresponding container tag of the text-content. For a full list of valid ISO language codes, view the W3 documentation here: https://www.w3docs.com/learn-html/html-language-codes.html

How to fix

Use only official, standard language and region codes. Change the lang attribute value to a valid, relevant ISO code. For a list of language and region codes, refer to List of ISO lang codes and HTML ISO Language Codes.