The labels for custom fields are not associated with their inputs using the for
attribute.
For example, this is the markup for a custom field for a user's country:
[CODE=html]<dl class="formRow formRow--customField formRow--input" data-field="country">
<dt>
<div class="formRow-labelWrapper">
<label class="formRow-label">Country</label></div>
</dt>
<dd>
<select name="custom_fields[country]" class="field_country input">
<option value="" selected="selected"> </option>
<!-- Options omitted for brevity -->
</select>
</dd>
</dl>[/CODE]
Compare this to the markup for the 'built in' location field, which does include the for
attribute (for="_xfUid-8-1618071982"
):
[CODE=html]<dl class="formRow formRow--input">
<dt>
<div class="formRow-labelWrapper">
<label class="formRow-label" for="_xfUid-8-1618071982">Location</label>
<dfn class="formRow-hint">Required</dfn></div>
</dt>
<dd>
<input type="text" class="input" name="location" required="true" id="_xfUid-8-1618071982">
</dd>
</dl>[/CODE]
This means that custom fields do not have an accessible name. This seems to affect custom fields for (at least) users, threads and XMFG media fields.