aria-describedby not set when using data-parsley-error-message
See original GitHub issueWhat kind of issue is this? (put ‘x’ between the square brackets)
-
Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn’t working the way you expect it to, use http://stackoverflow.com/questions/ask . Provide working code, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101. We monitor the tag
parsley.js
. -
Bug report. If you’ve found a bug, you must provide a minimal example in a CodePen, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101 .
-
Feature Request. Make sure there’s no good way to do what you want first; consider asking on http://stackoverflow.com/questions/ask first.
Example: http://jsfiddle.net/bn59odcu/
If you submit the form in the example above with two invalid email addresses the first input field will not have an aria-describedby attribute to reference the error message, but the second input will.
The issue seems to be related to using data-parsley-error-message specifically. Where we have used this attribute it is causing an accessibly issue on the project I’m working on and I assume it could be causing similar issues on other sites using Parsley. I can switch out the references to data-parsley-error-message for their error-specific alternatives for now, but it would be nice to have an official fix for this going forward.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Also,
Additionally, if an input already has an aria-describedby attribute set, Parsley should append to it instead of replacing it.
As per the docs, the aria-describedby attribute supports multiple space separated IDs, https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute