NVDA (and perhaps JAWS, but I'm not sure) don't yet support language switching for focused controls, so this is a bit tricky to test. However, users want this functionality, so screen readers will likely eventually support this.
STR (with the NVDA screen reader):
- Open this test case:
data:text/html,<select size="1"><option lang="de">1
- Tab to the select element.
- Press NVDA+control+z to open the NVDA Python Console.
- Paste this command and press enter:
wx.CallLater(5000, lambda: speech.speakMessage(repr(api.getFocusObject().language)))
- Quickly (before 5 seconds elapses), alt+tab back to Firefox and press alt+downArrow to open the dropdown.
- Expected: 5 seconds after you pressed enter in the console, NVDA should say "de"
- Actual: NVDA says "en_US"
This works as expected for a select element with size > 2; i.e. no dropdown. The problem is that select dropdowns are rendered in the parent process and we don't push the lang attribute for options to the parent process.