? Success
Pull Request for # 6596

User tests: Successful: Unsuccessful:

avatar vinespie
vinespie
30 Mar 2015

Removing "aria-invalid" attribute on label when form is not valid.
https://www.w3.org/WAI/GL/wiki/Using_Aria-Invalid_to_Indicate_An_Error_Field
Closes #6596


Client-side form validation : aria-invalid on label

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

Example before client-side validation :

<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>

Example after client-side validation wrong :

<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>

Example after client-side validation correct:

<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>

Patch to \media\system\js\validate-uncompressed.js

Remove line 52

if($label){
     $label.addClass('invalid');
}

Remove line 57

if($label){
     $label.removeClass('invalid');
}
avatar vinespie vinespie - open - 30 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2015
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 30 Mar 2015
The description was changed
Rel_Number 6596
Relation Type Pull Request for
Easy No Yes
avatar zero-24 zero-24 - change - 30 Mar 2015
Category JavaScript
avatar designbengel
designbengel - comment - 6 Jun 2015

I still have the aria-invalid="true" on the label...


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6613.

avatar designbengel designbengel - test_item - 6 Jun 2015 - Tested unsuccessfully
avatar yvesh
yvesh - comment - 24 Oct 2015

You should really include in the test notes that you need to enable joomla debugging for this (because else the compressed javascript is used)!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6613.

avatar degobbis degobbis - test_item - 24 Oct 2015 - Tested successfully
avatar degobbis
degobbis - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on af39a44


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6613.

avatar yvesh yvesh - test_item - 24 Oct 2015 - Tested successfully
avatar yvesh
yvesh - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on af39a44

Works fine


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6613.

avatar zero-24 zero-24 - change - 24 Oct 2015
Status Pending Ready to Commit
avatar zero-24 zero-24 - change - 24 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 24 Oct 2015
Labels Added: ?
avatar rdeutz
rdeutz - comment - 25 Oct 2015

we need the compressed version of the javascript file @vinespie please add it to the PR, thanks

avatar zero-24 zero-24 - change - 25 Oct 2015
Status Ready to Commit Pending
Labels
avatar zero-24
zero-24 - comment - 25 Oct 2015

Pending


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6613.

avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone
avatar roland-d roland-d - change - 25 Nov 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-11-25 21:17:01
Closed_By roland-d
avatar roland-d roland-d - close - 25 Nov 2015

Add a Comment

Login with GitHub to post a comment