Opened 3 years ago

Closed 2 years ago

#14227 closed defect (bug) (invalid)

wp_login_form remember input / label mixed

Reported by: chocks Owned by:
Priority: normal Milestone:
Component: Formatting Version: 3.0
Severity: normal Keywords: 2nd-opinion close
Cc: wojtek.szkutnik@…

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 3 years ago.

Download all attachments as: .zip

Change History (5)

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

Confirmed and fixed

  • 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.)

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.)

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