Hello,
When using the client-side form validation system joomla " behavior.formvalidator " when a field is misinformed and when the field is linked to a label, the attribute " aria -invalid = true" is added to the label.
According to accessibility standards this attribute should be only placed on the attribute "input".
Thank you for your answers
http://www.w3.org/TR/wai-aria/states_and_properties#aria-invalid
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-invalid_attribute
<form class="form-validate" method="post">
<label id="jform_title-lbl" title="" for="jform_title">Title</label>
<input id="jform_title" type="text" aria-required="true" required="required">
</form>
<form class="form-validate" method="post">
<label id="jform_title-lbl" title="" for="jform_title" aria-invalid="true">Title</label>
<input id="jform_title" type="text" aria-required="true" required="required" aria-invalid="true">
</form>
<form class="form-validate" method="post">
<label id="jform_title-lbl" title="" for="jform_title">Title</label>
<input id="jform_title" type="text" aria-required="true" required="required" aria-invalid="true">
</form>
Remove line 52
if($label){
$label.addClass('invalid');
}
Remove line 57
if($label){
$label.removeClass('invalid');
}
Labels |
Added:
?
|
Category | ⇒ | JavaScript |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-03-30 21:35:00 |
If you're right (I don't know but think so after reading also https://www.w3.org/WAI/GL/wiki/Using_Aria-Invalid_to_Indicate_An_Error_Field#Example_1)
your patch should be
Change line 52
Change line 57