#013503: Labels tags don't have for attribute

Description:

For accessibility reasons, "label" tags should have an attribute "for" with the id of the input field associated, example :


<label for="ezcoa-183_name">Titre <span class="required">(required)</span>:</label>
<input id="ezcoa-183_name" class="box ezcc-weblog ezcca-weblog_name" size="70" name="ContentObjectAttribute_ezstring_data_text_215486" value="" type="text">

With this code, clicking on the label gives the focus to the input field. This behaviour is also very practical for all users.


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


- Attachments

No attachments for this issue.


- Comments

This issue more or less requires us to make some guidelines for how id attributes should be generated since label tags often are not in the same template. That is a good thing though, among other things for JavaScript use.

#264052 by André R. on November 27th, 2009 [Permanent Link]

Fixed in
trunk (4.3.0alpha1) rev. 24459 (admin2 design) & 24465 + 24479 (standard design)

Leaving open for now to look into ezwebin and ezflow, and cause there is more places this can be added in standard / admin design as well.

#264125 by André R. on December 8th, 2009 [Permanent Link]

Nice to see this implemented :)
There are a lot of places in admin2 design (and probably in others) where at least one label still lacks the "for" attribute (I only list templates where the label is related to an input, select...) :
design/admin2/templates/children.tpl
design/admin2/templates/collaboration/handlers/view/full/ezapprove.tpl
design/admin2/templates/content/edit_states.tpl
design/admin2/templates/content/trash.tpl
design/admin2/templates/content/urlalias_wildcard.tpl
design/admin2/templates/package/creators/ezcontentobject/object_limit.tpl
design/admin2/templates/package/list.tpl
design/admin2/templates/settings/edit.tpl
design/admin2/templates/settings/view.tpl
design/admin2/templates/setup/datatype_basic.tpl
design/admin2/templates/setup/datatype_describe.tpl
design/admin2/templates/setup/session.tpl
design/admin2/templates/setup/templateoperator_basic.tpl
design/admin2/templates/setup/templateoperator_describe.tpl
design/admin2/templates/state/edit.tpl
design/admin2/templates/state/group_edit.tpl
design/admin2/templates/url/edit.tpl
design/admin2/templates/user/password.tpl
design/admin2/templates/user/setting.tpl
design/admin2/templates/workflow/edit.tpl
design/admin2/templates/workflow/eventtype/edit/event_ezapprove.tpl
design/admin2/templates/workflow/eventtype/edit/event_ezmultiplexer.tpl
design/admin2/templates/workflow/eventtype/edit/event_ezpaymentgateway.tpl
design/admin2/templates/workflow/eventtype/edit/event_ezwaituntildate.tpl
design/admin2/templates/workflow/groupedit.tpl

there are a lot in visual, pdf and shop templates too.

There are also some templates where the label tag is around the input and descriptive text :
design/admin2/templates/class/select_language.tpl
design/admin2/templates/content/create_languages.tpl
design/admin2/templates/content/edit_languages.tpl
design/admin2/templates/content/edit_menu.tpl
design/admin2/templates/content/restore.tpl
design/admin2/templates/content/search.tpl
design/admin2/templates/notification/handler/ezcollaboration/settings/edit.tpl
design/admin2/templates/notification/handler/ezgeneraldigest/settings/edit.tpl

I also notice that in 2 templates, the text related to an input is not in a label tag :
design/admin2/templates/content/view/versionview.tpl for SelectedSiteAccess, SelectedPlacement and SelectedLanguage radio input
design/admin2/templates/role/policyedit.tpl for DeleteSubtreeIDArray and DeleteNodeIDArray fields

Hope that helps.

#264171 by Damien Pobel on December 14th, 2009 [Permanent Link]

Closing as implemented since 4.3.0alpha is out, need to create another issue and take the rest in a new issue.

#264565 by André R. on February 8th, 2010 [Permanent Link]

- History
Properties
Type Enhancement
Priority Medium
Components Administration Interface
Design (templates, CSS, etc.)
Affects 3.9.4
3.10.0
4.0.0 - 4.0.0release
4.0.7
4.1.4
4.2.0 - 4.2.0release
Fix Version 4.3.0alpha1
Reporter Damien Pobel
Responsible André R.
Status 0 Closed
Resolution Implemented
Created August 17th, 2008
Updated July 29th, 2010
Resolved February 8th, 2010
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #018973
  Missing $placement parameter in modify method