adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

[Title v3] Allow page title in a different language than the page content #2729

Open renow-luxembourg opened 2 months ago

renow-luxembourg commented 2 months ago

Feature Request

Current Behavior : Sometime, we need to display a page title in a different language than the page content. The page title (text content of the h1 tag) written in a foreign language is not well rendered to assistive tool (like the NVDA screen reader)

Expected behavior/code : Each page title (text content of the h1 tag) should be vocalized in its appropriate language, even if this language is different of the page content.

Environment

Possible Solution : For the moment a possible workaround is to use "< span lang='fr' >Mon titre< /span >" (without the spaces) as page title. But it causes some issues with rendering when the page title is called from another component (e.g from the search, from breadcrumb or from navigation). A solution can be to add a language field in the cq_dialog of the title component.

Additional context : WCAG 2.1 : 3.1.2 Language of Parts (https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts) WCAG 2.1 : Technique H58 (https://www.w3.org/WAI/WCAG21/Techniques/html/H58) RGAA 4.1.2 / RAWeb 1 : 8.7.1 https://accessibilite.public.lu/fr/raweb1/criteres.html#test-8-7-1 (in french)