What the issue is
When including subdocuments within a webpage through elements like <iframe>, the omission of a lang attribute in the subdocuments can result in incorrect language identification and processing by assistive technologies. This misidentification can disrupt the user's ability to comprehend the content, especially if the language in the subdocument is different from the parent document.
Why this is important
Correct language identification is vital for accessibility as it allows assistive technologies to render and pronounce content correctly, respecting the linguistic nuances of different languages. This is critical for users who rely on screen readers to interpret and understand content, ensuring a coherent experience across the entirety of a web page, including any included subdocuments.
Who it affects
This issue primarily affects:
- Screen-reader users who rely on accurate language settings for content pronunciation.
- Users who utilize text-to-speech technologies to engage with digital content.
How to remediate the issue
- Ensure that all subdocuments embedded within a web page, such as those in <iframe> elements, have a lang attribute that correctly identifies the language of their content.
- For dynamic content that loads within iframes, use scripting solutions to dynamically assign the appropriate lang attribute corresponding to the content's language.
- Assess the language consistency between the parent document and its subdocuments to ensure coherent language identification across the user experience.
Additional guidance on handling languages in embedded content can be found at Understanding Success Criterion 3.1.2: Language of Parts.