Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Accessibility section to Readme #2149

Merged
merged 2 commits into from Aug 18, 2020

Conversation

joe-watkins
Copy link
Contributor

Adding Accessibility section to the readme that speaks to using errorElement in the validate() method.

Thank you!

@joe-watkins joe-watkins changed the title Joe watkins readme a11y Add Accessibility section to Readme Mar 6, 2018
@@ -73,6 +73,27 @@ $("#myForm").validate({
});
```

## Accessibility
For an invalid field, the default output for the jQuery Validation Plugin is an error message in a `<label>` element. This results in two `<label>` elements pointing to a single input field using the `for` attribute. While this is valid HTML, it has inconsistent support across screen readers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should mention a example on how this "bad html" looks like

@KatieMFritz
Copy link

This is great!

@staabm staabm merged commit b0e3b11 into jquery-validation:master Aug 18, 2020
@staabm
Copy link
Member

staabm commented Aug 18, 2020

Sorry for having this not merged earlier.

We can improve it further but lets have it in the readme for now.

Thx for the contribution and sorry for the overlong wait periode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants