Page with xml:lang
set on the html
and p
elements
Screen reader compatibility
Expected Result: works in a screen reader
Actual Result: causes problems in 48 screen reader / browser combinations
In English 'active table' is pronounced 'act-if tay-bill'. In French 'active table' is pronounced 'act-eef tab-le'. In English 'radio' is pronounced 'ray-day-oh'. In French 'radio' is pronounced 'rad-yoh'. In German 'radio' is pronounced 'rah-di-oh'.
By default NVDA uses Windows OneCore voices, which only support language switching if the appropriate Windows language pack is installed. Changing NVDA settings to use the eSpeak voice allows language switching without additional language packs.
Chrome/Edge used xml:lang
on any element when calculating phrase language until Chromium 87.
In Chrome/Edge 88 and later xml:lang
on elements is ignored except on the
html
element for page language.
WCAG Technique: WCAG 3.1.1 WCAG 3.1.2
Code used for this test:
<html xml:lang='fr'>
<head>
<title>Addition Report</title>
</head>
<body>
<p>Active table</p>
<p xml:lang='de'>radio</p>
</body>
</html>
Reliability Trend
This graph shows reliability over time for this code in NVDA, JAWS and Voiceover. Other screen readers don't have enough historical data yet to plot trends.
Change History
Last updated: November 26, 2024
- NVDA with Chrome Causes problems in NVDA 2024.4
- NVDA with IE Causes problems from NVDA 2018.4 to NVDA 2019.2
- NVDA with FF Causes problems from NVDA 2018.4 to NVDA 2024.4
- JAWS with Chrome Causes problems in JAWS 2024.2409.2
- JAWS with IE Causes problems from JAWS 2018.1811.2 to JAWS 2019.1912.1
- JAWS with FF Causes problems from JAWS 2018.1811.2 to JAWS 2024.2409.2
- VoiceOver macOS Causes problems from VoiceOver macOS 10.13 to VoiceOver macOS 14.6
- VoiceOver iOS Causes problems from VoiceOver iOS 11.4 to VoiceOver iOS 17.7
Screen reader | Browser | Mode | Notes | What the user hears |
---|---|---|---|---|
NVDA 2024.4 | Chrome 131 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2024.4 | FF 128 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2024.4 | Edge 131 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2023.3 | Chrome 120 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
NVDA 2023.3 | FF 115 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2023.3 | Edge 120 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
NVDA 2022.2 | Chrome 105 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
NVDA 2022.2 | FF 102 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2022.2 | Edge 105 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
NVDA 2021.2 | Chrome 94 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
NVDA 2021.2 | FF 91 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2021.2 | Edge 94 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
NVDA 2020.2 | Chrome 86 | Reading | Pronounced as French and German, xml:lang used at page and element level. | Act-eef tab-le. Rah-di-oh. |
NVDA 2020.2 | FF 78 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2020.2 | Edge 92 | Reading | Pronounced as French and German, xml:lang used at page and element level. | Act-eef tab-le. Rah-di-oh. |
NVDA 2019.2 | Chrome 79 | Reading | Pronounced as French and German. | Act-eef tab-le. Rah-di-oh. |
NVDA 2019.2 | FF 68 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2019.2 | IE11 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2018.4 | Chrome 73 | Reading | Pronounced as French and German. | Act-eef tab-le. Rah-di-oh. |
NVDA 2018.4 | FF 60 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
NVDA 2018.4 | IE11 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2024.2409.2 | Chrome 131 | Reading | Pronounced as English. Ignores xml:lang. | Act-eef tab-le. Rad-yoh. |
JAWS 2024.2409.2 | FF 128 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2024.2409.2 | Edge 131 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2023.2311.34 | Chrome 120 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
JAWS 2023.2311.34 | FF 115 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2023.2311.34 | Edge 120 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
JAWS 2022.2207.25 | Chrome 105 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
JAWS 2022.2207.25 | FF 102 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2022.2207.25 | Edge 105 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
JAWS 2021.2107.12 | Chrome 94 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
JAWS 2021.2107.12 | FF 91 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2021.2107.12 | Edge 94 | Reading | Pronounced as French, xml:lang ignored at element level. | Act-eef tab-le. Rad-yoh. |
JAWS 2020.2008.24 | Chrome 86 | Reading | Pronounced as French and German. | Act-eef tab-le. Rah-di-oh. |
JAWS 2020.2008.24 | FF 78 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2020.2008.24 | Edge 92 | Reading | Pronounced as French and German. | Act-eef tab-le. Rah-di-oh. |
JAWS 2019.1912.1 | Chrome 79 | Reading | Pronounced as French and German. | Act-eef tab-le. Rah-di-oh. |
JAWS 2019.1912.1 | FF 68 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2019.1912.1 | IE11 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2018.1811.2 | Chrome 73 | Reading | Pronounced as French and German. | Act-eef tab-le. Rah-di-oh. |
JAWS 2018.1811.2 | FF 60 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
JAWS 2018.1811.2 | IE11 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 14.6 | Safari 17.6 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 13.6 | Safari 16.6 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 12.5 | Safari 15.6 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 11.5 | Safari 15.0 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 10.15 | Safari 14.1 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 10.14 | Safari 13.0 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver macOS 10.13 | Safari 12.1 | Reading | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 17.7 | Safari iOS 17.7 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 16.6 | Safari iOS 16.6 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 15.6 | Safari iOS 15.6 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 14.7 | Safari iOS 14.7 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 13.3 | Safari iOS 13.3 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 12.4 | Safari iOS 12.4 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
VoiceOver iOS 11.4 | Safari iOS 11.4 | Touch | Pronounced as English. Ignores xml:lang. | Act-if tay-bill. Ray-day-oh. |
SortSite rules: AccPageLangMissing AccPhraseLangMissing
Test notes
All tests were carried out with screen reader factory settings. JAWS in particular has a wide variety of settings controlling exactly what gets spoken.
Screen readers allow users to interact in different modes, and can produce very different results in each mode. The modes used in these tests are:
- Reading Content read using the “read next” command in a screen reader
- Tabbing Content read using the “tab” key in a screen reader
- Heading Content read using the “next heading” key in a screen reader
- Touch Content read when touching an area of screen on a mobile device
In the “What the user hears” column:
- Commas represent short pauses in screen reader voicing
- Full Stops represent places where voicing stops, and the “read next” or “tab” or “next heading” command is pressed again
- Ellipsis … represent a long pause in voicing
- (Brackets) represent voicing that requires a keystroke to hear