An English page quotes a full sentence in French. Visually, the change is obvious to a reader who recognises both languages. Software cannot always infer the same information reliably from the words alone.
W3C’s explanation of WCAG Language of Parts describes identifying the language of passages or phrases so user agents and assistive technology can present them appropriately. In HTML, the relevant element can carry a lang attribute.
Mark the passage that changes language
<p>The greeting reads:
<span lang="fr">Bienvenue dans notre jardin.</span>
</p>
The page can keep English as its main language while this span identifies the French sentence. The attribute does not translate the words, and it does not replace a correct page-level language declaration.
For a longer quotation, place the language on the containing element rather than wrapping every word separately. Use a valid language tag that matches the content, and check the final HTML after the content-management system saves it.
Apply the rule thoughtfully
W3C’s criterion includes exceptions such as proper names, technical terms and expressions that have become part of the surrounding language. Do not mechanically label every borrowed word as a new language. Consider what the passage actually communicates.
Test with appropriate assistive technology and, where possible, readers who use the language. The installed voices and software affect the spoken result, so the markup is a necessary signal rather than a guarantee of one identical pronunciation everywhere.
Also keep language and text direction separate. A language attribute identifies language; it does not alone solve every mixed-direction layout issue or correct a poorly translated sentence.
Add a multilingual example to the component or publishing checklist. A page that contains only English during testing cannot reveal whether a later quotation keeps its language metadata. The small attribute is most useful when the whole authoring process preserves it from draft to rendered page.

