Enhance error handling accessibility
See original GitHub issueFirst of all - thanks for creating this amazing library. I’m currently doing research on form validation frameworks, since I have to decide which one to use in the near future for a big project. Therefore I have respect quite strict accessibility rules. I started to add basic aria roles/states here: e412198
TODO
- Add
role="alert"
attribute to fields with errors - Add
aria-invalid
attribute to fields with errors - Add
aria-labelledby="#ID"
with reference to elements id, containing the error message. Therefore every error message-item should have it’s own id. - Extend multiple validation-fields to use fieldsets as wrapper with
aria-required
,aria-invalid
attributes - Create error summary (above submit button) with list of links (containing anchors to the error fields in href) and errormessages (Example: error summary). This should have an option to enable/disable in the end.
Does somebody already work on that? Is that something, which you would like to integrate into the project? Maybe you could also give me some hints, where to add what (mainly the id-stuff for error messages), since I started today to read the code.
Cheers.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
User Notification | Web Accessibility Initiative (WAI) | W3C
Notifications have to be concise and clear. In particular, error messages should be easy to understand and should provide simple instructions on how...
Read more >How to make inline error messages accessible - Hidde's blog
In summary. In this post, I have discussed three ideas to improve the accessibility of dynamically added error messages: identify a field as...
Read more >How to Provide Accessible Form Error Identification
Overview. This post covers the basics of providing accessible form error identification to users with disabilities. Accessible error identification in ...
Read more >Accessibility Errors - W3Schools
An accessible form needs error messages that is perceivable and understandable for people who is color blind, who is blind or low vision,...
Read more >Alert Users to Errors that Prevent Form Validation
One of the simplest ways to enhance forms accessibility is to help users avoid errors before the errors even occur. We can prevent...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Unless it involves a lot of code, it would be even better if it was integrated in parsley itself.
Hi there,
Thanks for your interest in Parsley.
What you want to achieve is great. But it should not alter the existing Parsley code. Not everyone want to be accessibility standards compliant, that should be a separate Parsley plugin.
field:init event
form:validate
I’m not sure if you are very familiar with Parsley code, configuration and extension, but you should definately do this, but in a plugin mindset, not directly in the code like you are doing on your repo, because I won’t ship it that way 😃
What do you think ?
Best