-
Notifications
You must be signed in to change notification settings - Fork 644
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
Fix accessibility issues identified by tool #5795
Changes from 8 commits
b1aef76
d35ca48
f7ac4c5
8764838
781afb7
4df30e3
1678baf
cec2e3c
1c7947e
0254ebe
279b122
66dcf5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,10 +50,45 @@ | |
} else { | ||
error.insertAfter(element); | ||
} | ||
}, | ||
showErrors: function (errorMap, errorList) { | ||
this.defaultShowErrors(); | ||
|
||
var i; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JQuery Validate adds an EDIT: going to put this in a comment for future's sake |
||
for (i = 0; this.errorList[i]; i++) { | ||
removeInvalidAriaDescribedBy(this.errorList[i].element); | ||
} | ||
|
||
for (i = 0; this.successList[i]; i++) { | ||
removeInvalidAriaDescribedBy(this.successList[i]); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
function removeInvalidAriaDescribedBy(element) { | ||
var describedBy = element.getAttribute("aria-describedby"); | ||
if (!describedBy) { | ||
return; | ||
} | ||
|
||
var ids = describedBy.split(" ") | ||
.filter(function (describedById) { | ||
if (!describedById) { | ||
return false; | ||
} | ||
|
||
var describedByElement = $("#" + describedById); | ||
return describedByElement && describedByElement.text(); | ||
}); | ||
|
||
if (ids.length) { | ||
element.setAttribute("aria-describedby", ids.join(" ")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only call `setAttribute if the IDs set has changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is |
||
} else { | ||
element.removeAttribute("aria-describedby"); | ||
} | ||
} | ||
|
||
nuget.parseNumber = function (unparsedValue) { | ||
unparsedValue = ('' + unparsedValue).replace(/,/g, ''); | ||
var parsedValue = parseInt(unparsedValue); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,9 +44,9 @@ | |
</div> | ||
</div> | ||
<div class="row text-center create-provider-account"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should only be one of these... not one per provider. You can put it in a |
||
<span> | ||
<a href="#" id="signin-assistance">Need assistance signing in?</a> | ||
</span> | ||
<span> | ||
<a href="#" class="signin-assistance">Need assistance signing in?</a> | ||
</span> | ||
</div> | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jquery.validate
calls it whenever the state of our forms has changed. It adds validation error text to our forms when the content isn't correct. I'm using their default process and appending an additional step.