Wrong `for` attribute on the label

Created on 14 October 2011, about 13 years ago
Updated 14 September 2024, 2 months ago

I create a field url in the comment to my content type.
The for attribute of the label is not same to the id of the input.

<div class="field-type-link-field field-name-field-comment-url field-widget-link-field form-wrapper" id="edit-field-comment-url">
	<div id="field-comment-url-add-more-wrapper">
		<div class="form-item form-type-link-field form-item-field-comment-url-und-0">
  			<label for="edit-field-comment-url-und-0">Site URL </label>
 			<div class="link-field-subrow clearfix">
 				<div class="link-field-url">
 					<div class="form-item form-type-textfield form-item-field-comment-url-und-0-url">
 						<input type="text" id="edit-field-comment-url-und-0-url" name="field_comment_url[und][0][url]" value="" size="60" maxlength="2048" class="form-text" />
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

Sorry for my bad English

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France StevenMouret

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • @dqd opened merge request.
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Let's quickly add the supposed fix from #8 in the dev branch for thoose who still need it.

  • Status changed to RTBC 3 months ago
    • dqd committed 59cbe03e on 7.x-1.x
      Issue #1309768 by dqd, rudiedirkx, jcfiala: Wrong `for` attribute on the...
  • Status changed to Fixed 3 months ago
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    I created a quick fix based on #8 but I'll close this issue now due to inactivity for 12 years and upcoming EOL of Drupal 7 in January 2025. While the project version for Drupal 7 will keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. Thanks for the report and all the efforts in here. Feel free to re-open if you can provide a better fix or found an additional related problem which increases the issue priority to "Critical" here.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024