Working with a 3rd party vendor for a SP 2010 implementation. Have noticed that form elements are not so desirable in that we're not getting our markup replicated 100% when it comes to label "for" attributes matching corresponding input "id" attributes. This is so if you click on the label, for example, the radio button becomes checked. It basically makes for much larger target/clickable areas, which are much better for users.
<input id="php_member" type="radio" name="member" checked="checked">
<label for="php_member">PHP member</label>
I've filed a bug on this and here is the developers response:
"The for/id attributes combination won't work in sharepoint for serverside controls. The example you given above is for html controls and when we make them to run at server side sharepoint will automatically change the values for 'ID' and 'name' attributes for all server side controls on every webpart page. I mean the following tags: ( No PHP member ID) will appear as follows on a sharepoint page (As we added runat="server") : No PHP member ID Thus 'for/id' is not maintained here. Sharepoint does this because a webpart can be added multiple times on a page and a page donot allow two controls with same Id."
I understand what he's saying, I'm just wondering if it's possible in 2010 to correct this. I don't know why these are server side controls or if they really need to be - I assume so, otherwise they would have been implemented some other way.
Can you not tie for/id elements together? This is one of the basic things you can do to make your forms more accessible. I'm obviously not a SP dev so here I am seeking any info we can possibly look into. :)