Important: This website does not attempt to establish a standard for how assistive technologies must behave. Read the FAQ for more information. Additionally, this is a work in progress. Please submit feedback or suggestions.

Test: HTML option[lang] element

Screen Reader support level: partial (1/11)

Voice Control support level: unknown

On this page

About this test

This test ensures that option elements with a lang attribute are announced correctly.

Submit new test results

Age of results

Results in this test range from 6 years ago to 6 years ago. See detailed information about test dates and versions for more information.

Caution

Failing or partial results may be out of date. The oldest result is from 6 years ago. Consider running this test and contributing results.

Test HTML

Open the test case HTML file
<!DOCTYPE html>
<html lang="en">
<head>
    <title>HTML option element with lang attribute</title>
</head>
<body>
<p>Use the screen reader to announce the target element.</p>

<label for="language-picker">
    Select language with lang set
    <select id="language-picker">
        <option lang="en">English</option>
        <option lang="fr">Français</option>
        <option id="target" lang="zh">中文 (简体)</option>
    </select>
</label>
</body>
</html>

Summary of Screen Reader support by expectation

lang attribute
ExpectationJAWSNarratorNVDAOrcaTalkBackVoiceOver (iOS)VoiceOver (macOS)
ChromeEdgeFirefoxEdgeChromeEdgeFirefoxFirefoxChromeSafariSafari
MUST switch to the specified language if it is valid applied to: option elementunknownunknownunknownunknownunknownunknownsupportedunknownunknownunknownnone

* means that some support is hidden behind settings

Summary of Voice Control support by expectation

lang attribute
ExpectationDragon Naturally SpeakingVoice Access (Android)Voice Control (iOS)Voice Control (MacOS)Windows Speech RecognitionWindows Voice Access
ChromeChromeSafariSafariEdgeChromeEdgeChrome
Not applicable

* means that some support is hidden behind settings

Detailed support results by expectation

Expectation for the lang attribute: switch to the specified language if it is valid - applied to the option element

This expectation is applied to the option element. Expectations and results might differ when the the feature is applied to different roles.

This expectation is from the lang attribute feature.

Strength of this expectation for different types of assistive technologies:

  • Screen Readers: MUST
  • Voice Control: NA

Grading method:

Just one of the listed commands must pass for the expectation to pass.

ATBrowserHas SupportOutput
Dragon Naturally SpeakingChromenot applicable-
JAWSChromeunknown-
JAWSEdgeunknown-
JAWSFirefoxunknown-
NarratorEdgeunknown-
NVDAChromeunknown-
NVDAEdgeunknown-
NVDAFirefoxyes
  • Result: (pass)
    • Test Case: Use down arrow (Read next item) to navigate forward to `*[lang]`
      1. Launch NVDA and Firefox.
      2. Navigate to the test page.
      3. Find the target element(s) that you will test against. Identify all elements that match this selector:*[lang]
        • If multiple elements match the selector, repeat this test for all instances. However, choose a single instance to report against. If you feel that the selector should be more specific, please open a GitHub Issue.
      4. Position and configure the screen reader so that the following conditions are met
        • Virtual focus is: before target
        • Keyboard focus is: before target
        • Mode is: auto (do not explicitly change the mode)
      5. Issue the command: down arrow (Read next item)
        • After issuing the command, virtual focus should be: target
      6. Record results for the relevant expectations
    • Output: 中文 (简体)
Notes: Had to install the Simplified Chinese language in the Windows 10 Language Settings for this to work. If the language is not installed, nothing will be announced.
OrcaFirefoxunknown-
TalkBackChromeunknown-
Voice Access (Android)Chromenot applicable-
Voice Control (iOS)Safarinot applicable-
Voice Control (MacOS)Safarinot applicable-
VoiceOver (iOS)Safariunknown-
VoiceOver (macOS)Safarinone
  • Result: (fail)
    • Test Case: Use VO + Right arrow (Read next item) to navigate forward to `*[lang]`
      1. Launch VoiceOver (macOS) and Safari.
      2. Navigate to the test page.
      3. Find the target element(s) that you will test against. Identify all elements that match this selector:*[lang]
        • If multiple elements match the selector, repeat this test for all instances. However, choose a single instance to report against. If you feel that the selector should be more specific, please open a GitHub Issue.
      4. Position and configure the screen reader so that the following conditions are met
        • Virtual focus is: before target
        • Keyboard focus is: before target
        • Mode is: auto (do not explicitly change the mode)
      5. Issue the command: VO + Right arrow (Read next item)
        • After issuing the command, virtual focus should be: target
      6. Record results for the relevant expectations
    • Output: (attempts to speak characters as english ideographs)
    • Grading note: This command may be expected to fail. This result simply indicates that it did not yield support.
Notes: Had the Chinese language installed in VO settings.Grading Note: There is no known/documented support. There may still be support for this expectation, but it is undocumented. If this is the case, please report this issue.
Windows Speech RecognitionEdgenot applicable-
Windows Speech RecognitionChromenot applicable-
Windows Voice AccessEdgenot applicable-
Windows Voice AccessChromenot applicable-
Windows KeyboardChromenot applicable-
Windows KeyboardFirefoxnot applicable-
Windows KeyboardEdgenot applicable-
Mac KeyboardChromenot applicable-
Mac KeyboardSafarinot applicable-
iOS KeyboardSafarinot applicable-
Android KeyboardChromenot applicable-

Extended Support for: lang attribute: switch to the specified language if it is valid

These are less common combinations

ATBrowserHas SupportOutput
Dragon Naturally SpeakingIEnot applicable-
Dragon Naturally SpeakingFirefoxnot applicable-
JAWSIEunknown-
NarratorFirefoxunknown-
NarratorChromeunknown-
NarratorIEunknown-
NVDAIEunknown-
TalkBackFirefoxunknown-
Voice Access (Android)Firefoxnot applicable-
VoiceOver (iOS)Chromeunknown-
VoiceOver (macOS)Chromeunknown-
VoiceOver (macOS)Firefoxunknown-
OrcaChromeunknown-
Voice Control (MacOS)Chromenot applicable-
Voice Control (MacOS)Firefoxnot applicable-
Mac KeyboardFirefoxnot applicable-
Android KeyboardFirefoxnot applicable-
Back to top

Dates and Versions of tested combinations

ATAT VersionBrowserBrowser versionOS versionDate tested
NVDA2018.3.2Firefox62Windows 10 version 18092018-10-19
VoiceOver (macOS)10.14Safari1210.142018-10-19

History

  • 2018-10-19 Test created