Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Core: Unnecessary aria-describedby (makes #2094 fixable)#2410
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
eden-jh wants to merge15 commits intojquery-validation:masterChoose a base branch fromeden-jh:unnecessary-aria-describedby
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Changes fromall commits
Commits
Show all changes
15 commits Select commitHold shift + click to select a range
b190ab1
Core: progress on removing aria-describedby from valid fields
eden-jh86880c1
core: aria-describedby
eden-jh4009ffe
Core: remove aria-describedby when hiding error
eden-jhbd860fa
Core: fix syntax issues, Test: add test for new setting
eden-jh567bd4c
Core: Fix bugs in aria-describedby behavior and related tests
eden-jh0af496d
Core: bugfix for labels without id
eden-jha46475e
Core: don't create a new error element if one exists
eden-jh7e8a788
Core: progress on test for group of fields with ariaDescribedbyCleanup
eden-jh2f29b11
Core: Groups aria-describedby
eden-jh11c72be
Core: fix aria-describedby not being removed from grouped fields
eden-jh2b367e0
Core: Update capitalization
eden-jh31847b9
Demo: Add page for ariaDescribedByCleanup
eden-jh73a70d2
Core: add setting to remove aria-describedby from valid fields
eden-jh96be3bb
Merge branch 'unnecessary-aria-describedby' of https://github.com/ede…
eden-jhebe5293
Core: Fix camel case inconsistency, remove stray comment
eden-jhFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
110 changes: 110 additions & 0 deletionsdemo/aria-describedby-cleanup.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>jQuery Validation Plugin Demo - ariaDescribedByCleanup set to true</title> | ||
<link rel="stylesheet" href="css/screen.css"> | ||
<script src="../lib/jquery.js"></script> | ||
<script src="../dist/jquery.validate.js"></script> | ||
<script> | ||
$.validator.setDefaults({ | ||
submitHandler: function() { | ||
alert("submitted!"); | ||
} | ||
}); | ||
$().ready(function() { | ||
var valid = $("#group-form").validate({ | ||
errorElement: 'div', | ||
groups: { | ||
fullName: "first middle last" | ||
}, | ||
ariaDescribedByCleanup: true, | ||
rules: { | ||
first: { required: true, minlength: 2 }, | ||
middle: {required: true, minlength: 2 }, | ||
last: {required: true}, | ||
email: { required: true, email: true }, | ||
phone: { required: true }, | ||
comment: {required: true, maxlength: 300} | ||
} | ||
}); | ||
$('button[type="reset"]').on('click',function(){ | ||
valid.resetForm(); | ||
}); | ||
}); | ||
</script> | ||
<style> | ||
#group-form { | ||
width: 35rem; | ||
} | ||
.textarea-container { | ||
display: inline-block; | ||
} | ||
.description { | ||
display: block; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1 id="banner"><a href="https://jqueryvalidation.org/">jQuery Validation Plugin</a> Demo - ariaDescribedByCleanup set to true</h1> | ||
<main id="main"> | ||
<form id="group-form" class="cmxform" aria-labelledby="group-example-title" aria-describedby="required-note"> | ||
<div class="box"> | ||
<h2 id="group-example-title">Example with group</h2> | ||
<div><p id="required-note">Fields marked with * are required</p></div> | ||
<div id="errorlabelcontainer"></div> | ||
<fieldset> | ||
<legend>Name*</legend> | ||
<div class="row"> | ||
<div class="col"> | ||
<label for="first">First</label> | ||
<input type="text" aria-required="true" id="first" name="first"/> | ||
</div> | ||
<div class="col"> | ||
<label for="middle">Middle</label> | ||
<input type="text" aria-required="true" id="middle" name="middle"/> | ||
</div> | ||
<div class="col"> | ||
<label for="last">Last</label> | ||
<input type="text" aria-required="true" id="last" name="last"/> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<div class="row"> | ||
<label for="email">Email*</label> | ||
<input type="email" id="email" aria-required="true" name="email"/> | ||
</div> | ||
<div class="row"> | ||
<label for="phone">Phone*</label> | ||
<input type="text" id="phone" aria-required="true" name="phone"/> | ||
</div> | ||
<div class="row"> | ||
<label for="comment">Your comment*</label> | ||
<div class="textarea-container"> | ||
<textarea id="comment" name="comment" aria-required="true" aria-describedby="comment-max-length"></textarea> | ||
<span class="description" id="comment-max-length">300 characters maximum</span> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<button>Submit</button> | ||
<button type="reset">Reset</button> | ||
</div> | ||
</div> | ||
</form> | ||
<p><a href="index.html">Back to main page</a></p> | ||
</div> | ||
</main> | ||
</html> |
26 changes: 22 additions & 4 deletionsdemo/css/cmxform.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
22 changes: 14 additions & 8 deletionsdemo/css/cmxformTemplate.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletionsdemo/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.