name and id in class.module.inc.php

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

name and id in class.module.inc.php

Post by nils73 »

There seems to be a problem with class.module.inc.php which is closely related to accessibility but I guess it matches this topic (Quality Assurance) bests. When coding standards compliant websites you need to specify a label for each form-field, i.e.

Code: Select all


<label for="c4input_name">First Name:
  <input type="text" id="c4input_name" />
</label>

At present there is only an attribute for name, but none for id. When I modify class.module.inc.php to display both values, I get a lot of problems in admin-mode, i.e. some fields won't update anymore. Does anyone know a workaround for me, except for creating my own module-instances for fields?

Regards,
Nils
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: name and id in class.module.inc.php

Post by Ted »

The best way to handle this would be to have a module api method to create a label.  That way it would take the id into account also.  Though, honestly, I'm not sure how that could happen with the input being inside the label.  I thought they were exclusive.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: name and id in class.module.inc.php

Post by nils73 »

There are two ways to handle fields and labels. One is to put label before input, second (and best for accessibility) is to have the label-tag around the field-tag. But this should be up to the coder because sometimes you can't do the one thing and have to go with the other.

I already thought that this might get difficult ... so I will code my own module-instances ... knowing that this makes me cry when it comes to updates.

Regards,
Nils
Locked

Return to “[locked] Quality Assurance”