-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
accessibility supportAccessibility support testing and trackingAccessibility support testing and tracking
Description
Accessibility support
There are differences in how assistive technologies handle unknown and invalid language tags. Some will default to the language of the page, whereas others will default to the closest ancestor with a valid lang attribute.
ACT Rules
Test cases
Test case 1
Testing handling of invalid and unknown language tags
<html lang="en">
<!-- Valid language tag -->
<p lang="fr">Bonjour le monde!</p>
<!-- Invalid language tag -->
<p lang="french">Hello World!</p>
<!-- Unknown language tag -->
<p lang="xyz">Hello World!</p>
<!-- Nested invalid within valid -->
<div lang="es">
<p>¡Hola Mundo!</p>
<p lang="spanish">¡Hola!</p>
</div>
<!-- Invalid parent with valid child -->
<div lang="invalid-tag">
<p>Some text</p>
<p lang="de">Hallo Welt!</p>
</div>
<!-- Empty language tag -->
<p lang="">Hello World!</p>
<!-- Malformed language tag -->
<p lang="en-">Hello World!</p>
</html>
Test instructions
- Load the test case in different browsers
- Test with different assistive technologies
- For each scenario, check:
- How the language is announced
- What language voice/accent is used
- If it falls back to page language
- If it inherits from valid ancestors
- Expected results:
- Valid tags should be announced correctly
- Invalid tags should be handled consistently
- Inheritance from ancestors should work
- Fallback behavior should be predictable
External links
- HTML Language specification: https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes
- Valid language subtags: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
- WCAG Understanding SC 3.1.2: https://www.w3.org/WAI/WCAG22/Understanding/language-of-parts
Test results
Please report test results in a comment below. Please use the following format:
## Test case 1
- Date: ...
- Operating system: ..., version ...
- Browser: ..., version ...
- Assistive technology: ..., version ...
- Results for each scenario:
1. Valid tag (fr): ... (announced/voice used)
2. Invalid tag (french): ... (fallback behavior)
3. Unknown tag (xyz): ... (fallback behavior)
4. Nested invalid in valid: ... (inheritance behavior)
5. Invalid parent with valid child: ... (inheritance behavior)
6. Empty tag: ... (fallback behavior)
7. Malformed tag: ... (fallback behavior)
- Fallback consistency: ... (consistent/inconsistent)
- Inheritance behavior: ... (working/not working)
- Test result: Passed / Failed (if failed, how was it different from expected?)
Metadata
Metadata
Assignees
Labels
accessibility supportAccessibility support testing and trackingAccessibility support testing and tracking