Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#14227 closed defect (bug) (invalid)

wp_login_form remember input / label mixed

Reported by: chocks's profile 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 13 years ago.

Download all attachments as: .zip

Change History (5)

#1 @wojtek.szkutnik
13 years ago

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

Confirmed and fixed

#2 @nacin
13 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.)

#3 @GamajoTech
13 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.)

#4 @nacin
12 years ago

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