Abide incorrectly points form fields with aria-describedby
to hidden form error messages
#12393
Closed
3 tasks done
What should happen?
When using abide with a pre-defined invisible form error element, the screen reader should not announce the hidden error message before it becomes visible on the screen.
What happens instead?
When using abide with a pre-defined invisible form error element, the screen reader will announce the error even before it is visible on the screen and when the field is perfectly valid. Generally these error messages state something along "this field has an error" which is confusing for the users of assistive technologies in case their input is perfectly valid (or when they enter the field for the first time).
Possible Solution
Remove the
aria-describedby
attribute automatically added by Abide or only add it once the error becomes visible on the screen.Test Case and/or Steps to Reproduce (for bugs)
Test Case: https://jsfiddle.net/f3g2rx1j/show
How to reproduce:
Context
This issue was reported by accessibility experts testing a web service built on Foundation.
This behavior was added on PR #10699 by @ncoden in commit 88abca7.
It became part of v6.5.0 (first introduced in v6.5.0-rc.1).
In the current code, the behavior can be found from these lines:
foundation-sites/js/foundation.abide.js
Lines 298 to 308 in 8846fda
Your Environment
aria-describedby
)Checklist
The text was updated successfully, but these errors were encountered: