          widget = self.field.widget
          id_ = widget.attrs.get('id') or self.auto_id
          if id_:
              attrs = flatatt(attrs) if attrs else ''
              contents = format_html('<label{0}>{1}</label>', attrs, contents)
          else:
              contents = conditional_escape(contents)
          return mark_safe(contents)
  
 
</s> remove             contents = format_html('<label for="{0}"{1}>{2}</label>',
                                   widget.id_for_label(id_), attrs, contents
                                   )
 </s> add             contents = format_html('<label{0}>{1}</label>', attrs, contents) </s> remove         self.assertEqual(display_value, expected)
 </s> add         self.assertHTMLEqual(display_value, expected) </s> remove         self.assertEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                         '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                         '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
 </s> add         self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>') </s> remove         self.assertEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                         '<label for="id_text" class="required inline">&amp;text:</label>')
        self.assertEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                         '<label for="id_cb" class="vCheckboxLabel required inline">&amp;cb</label>')
 </s> add         self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline">&amp;text:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline">&amp;cb</label>') </s> remove class UtilTests(unittest.TestCase):
 </s> add class UtilTests(SimpleTestCase):
            id_for_label = widget.id_for_label(id_)
            if id_for_label:
                attrs = dict(attrs or {}, **{'for': id_for_label})
          widget = self.field.widget
          id_ = widget.attrs.get('id') or self.auto_id
          if id_:
            id_for_label = widget.id_for_label(id_)
            if id_for_label:
                attrs = dict(attrs or {}, **{'for': id_for_label})
              attrs = flatatt(attrs) if attrs else ''
              contents = format_html('<label{0}>{1}</label>', attrs, contents)
          else:
              contents = conditional_escape(contents)
          return mark_safe(contents)
  
keep keep add keep keep keep keep keep keep
 Fixed #11725 -- Made possible to create widget label tag without "for"

Thanks Denis Martinez for the report and initial patch, and
Sergey Kolosov for bringing the patch up to date. 
django/forms/forms.py