[TextField] [a11y]: Text field validation message is not announced by screen reader
Bug Report
- Package version(s): master
- Browser and OS versions: IE 11, firefox 50.1
Describe the issue:
On validation error in a textfield, the error is not announced by the screen reader.
More debug info:
It happens since live region div is added only when error happens and screen readers are unable to read dynamically added/removed live region divs.
Possible fix:
To support screen readers, there should be a live region on the loaded page to allow parsing. A fix would be to always create live-region for error message container. commit 5fa17be
Actual behavior:
On validation error in a textfield, the error message is not announced by the screen reader.
Expected behavior:
On validation error in a textfield, the error message should be announced by the screen reader.
If applicable, please provide a codepen repro:
https://dev.office.com/fabric#/components/textfield
@dzearing, can you review the fix ?
I don't really understand the issue with the screen readding. Adding @ipip2005 , also @cschlechty may be a better resource here.
Fix looks good.
Thanks @cschlechty for the review. Its an issue with how browser and screen reader together support accessibility APIs. Some browsers + screen reader combinations like IE11, Edge + NVDA don't react to dynamically added live-regions or alerts. For IE11, Edge + narrator it does. Same way, NVDA with firefox works without any glitch. By this fix we will be supporting all browser + screen readers combination.
The change looks OK for me and looks won't affect the original behavior. It's good to learn this trick of AT+browser combinations. As I know, NVDA recommends Firefox as its working-with browser. (some hard-code support) JAWS officially supports IE and Firefox as its working-with browser. @mdahamiwal is this issue also affect NVDA + Firefox? In our team's a11y testing we only focus on the major combinations, it would be nice if @mdahamiwal you can share some experience on how disability would choose ATs and browsers. Currently for us it seems impossible to find issues like this since we never test with some combinations like NVDA + Edge.
This doesn't affect NVDA + Firefox. Having said that, we may be OK with not taking this fix. For IE and Edge it anyway works with narrator. I have no idea on how disabled users choose ATs but JAWS and NVDA are more popular as compared to others. Personally, I prefer testing with NVDA + Edge primarily for two reasons:
- Its a first party browser and ships as default with windows 10. Testing with Edge can help first party teams in fixing issues or take improvements where it might be lacking.
- From accessibility perspective it exposes more UIA data as compared to IE11 or firefox which means ATs can do more with Edge when they start using that data.
Testing with all combinations can be time consuming and frustrating for the testers. And it gets harder to figure out if there is a bug in browser or AT. For teams like this, it make sense to only test with major combinations as you do currently and leave rest of it to the consumers to report such bugs. 😄
The major browser combos are Narrator+Edge, JAWS+IE11, and NVDA+Firefox. We generally want to test with the first 2 as we are making great strides in our first party AT and want to ensure it's useable, and JAWS because it has the lions-share of usage (the last I checked, it was ~80%). If it works there, we should be pretty set as remaining bugs would be AT specific.
This is still an issue with EDGE+Narrator combination .