WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#14227 closed defect (bug) (invalid)

wp_login_form remember input / label mixed

Reported by: chocks Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Formatting Keywords: 2nd-opinion close
Focuses: Cc:

Description

On wp-includes/general-template.php line 284 it says:
' . ( $argsremember? ? '<p class="login-remember"><label><input name="rememberme" type="checkbox" id="' . esc_attr( $argsid_remember? ) . '" value="forever" tabindex="90"' . ( $argsvalue_remember? ? ' checked="checked"' : ) . ' /> ' . esc_html( $argslabel_remember? ) . '</label></p>' : ) . '

Should be:
' . ( $argsremember? ? '<p class="login-remember"><label>' . esc_html( $argslabel_remember? ) . '</label><input name="rememberme" type="checkbox" id="' . esc_attr( $argsid_remember? ) . '" value="forever" tabindex="90"' . ( $argsvalue_remember? ? ' checked="checked"' : ) . ' />
</p>' :
) . '

Where <p><label>$labelname</label> and <input /></p>

Attachments (1)

14227.diff (1.3 KB) - added by wojtek.szkutnik 5 years ago.

Download all attachments as: .zip

Change History (5)

@wojtek.szkutnik5 years ago

comment:1 @wojtek.szkutnik5 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords gsoc has-patch needs-testing added

Confirmed and fixed

comment:2 @nacin5 years ago

  • Keywords 2nd-opinion close added; wp_login_form gsoc has-patch needs-testing removed

What is this fixing?

It looks like all it is doing is switching the checkbox and the text.

Additionally the patch breaks the label association with the checkboxes. Labels either have to be linked to inputs with the 'for' attribute, or they need to wrap the input. (Which is why it wrapped it originally.)

comment:3 @GamajoTech4 years ago

I'll second nacin's comments - there's no fixing here, just breaks.

@wojtek.szkutnik - it's fairly standard to have checkbox and radio inputs appear *before* the labels, unlike regular text/password/html5 variants inputs which tend to have their labels to the left or above.
(Although saying that, the CC feature of Trac does it the other way around I notice.)

comment:4 @nacin4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.