-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new test suite for testing the ARIA-invalid features Also added a few minor fixes for typos in the QUnit scaffolding and JSHint errors Fix "%o has no name assigned [object HTMLInputElement]" errors in bypassValidation tests
- Loading branch information
1 parent
600e292
commit 3d5658e
Showing
4 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,27 @@ | ||
module("aria"); | ||
|
||
test("Invalid field adds aria-invalid=true", function() { | ||
var ariafirstname = $('#ariafirstname'); | ||
var form = $('#ariaInvalid'); | ||
form.validate({ | ||
rules: { | ||
ariafirstname: 'required' | ||
} | ||
}); | ||
ariafirstname.val(''); | ||
ariafirstname.valid(); | ||
equal(ariafirstname.attr('aria-invalid'), "true"); | ||
}); | ||
|
||
test("Valid field adds aria-invalid=false", function() { | ||
var ariafirstname = $('#ariafirstname'); | ||
var form = $("#ariaInvalid"); | ||
form.validate({ | ||
rules: { | ||
ariafirstname: "required" | ||
} | ||
}); | ||
ariafirstname.val('not empty'); | ||
ariafirstname.valid(); | ||
equal(ariafirstname.attr("aria-invalid"), "false"); | ||
}); |
This file contains 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
This file contains 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