question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

aria-describedby not set when using data-parsley-error-message

See original GitHub issue

What kind of issue is this? (put ‘x’ between the square brackets)

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:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
WW3commented, Nov 22, 2018

Also,

  • remove the attribute when the field gets a valid value
  • when .parsley-custom-error-message messages are visually hidden, consider also hiding from screen reader users by toggling an aria-hidden attribute
1reaction
leejacobsoncommented, Nov 13, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

aria-describedby not set when using data-parsley-error-message -
aria -describedby not set when using data-parsley-error-message. ... This issue tracker is not the place for questions. If you want to ask how...
Read more >
Which Parsley.js method should I use for adding/updating ...
I have a parsley-config.js file in which I have successfully added lots of customizations to parsley, utilizing the methods described on ...
Read more >
Parsley - Find the help you need
Parsley ships with a lot of easy to use built-in stuff, be sure to read the ... 5 comments aria-describedby not set when...
Read more >
ARIA1: Using the aria-describedby property to provide ... - W3C
Note: The aria-describedby property is not designed to reference descriptions on an external resource — since it is an ID, it must reference...
Read more >
The ultimate documentation - Parsley
Javascript form validation is not necessary, and if used, it does not replace ... Parsley comes with various error messages for its built-in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found