Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#38459 closed defect (bug) (fixed)

Checkbox have double label on single input field

Reported by: ankit-k-gupta's profile Ankit K Gupta Owned by: afercia's profile afercia
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch
Focuses: ui, accessibility, multisite Cc:

Description

On user-new.php, Skip Confirmation Email heading have double label but other checkbox on other screen have single label.
It should show same behavior on all screen.

Attachments (3)

new-user.php.png (50.8 KB) - added by Ankit K Gupta 8 years ago.
Screenshot of new user screen
38459.patch (1.2 KB) - added by Ankit K Gupta 8 years ago.
added patch
38459.diff (2.5 KB) - added by afercia 8 years ago.

Download all attachments as: .zip

Change History (8)

@Ankit K Gupta
8 years ago

Screenshot of new user screen

@Ankit K Gupta
8 years ago

added patch

#1 @Ankit K Gupta
8 years ago

  • Keywords has-patch added

#2 @Ankit K Gupta
8 years ago

  • Summary changed from Check box have duble label on single inpiy field to Checkbox have double label on single input field

#3 @afercia
8 years ago

  • Component changed from Users to Networks and Sites
  • Focuses multisite added; administration removed

@afercia
8 years ago

#4 @afercia
8 years ago

  • Milestone changed from Awaiting Review to 4.7
  • Owner set to afercia
  • Status changed from new to assigned
  • Version 4.6.1 deleted

It would be great to fix this and I'd say it's simple enough to go in 4.7. Refreshed patch to properly associate some checkboxes labels. Labels can be associated to their related form fields either explicitly (using a for attribute referencing the field ID) or implicitly (using the label to wrap the field). As a best practice, never do both and prefer explicitly associated labels when possible.

#5 @afercia
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 39006:

Accessibility: Improve the form labels on the Add New User screen.

On the Multisite - single site "Add New User" screen, some form fields have more
than one label associated with them. Form controls should have at most one
associated label element. If more than one label element is associated to the
control, assistive technologies may not read the appropriate label.

Additionally, labels can be associated to their related form fields either
explicitly (using a for attribute referencing the field ID) or implicitly
(using the label to wrap the field). As a best practice, never do both and
prefer explicitly associated labels when possible.

Props Ankit K Gupta.
Fixes #38459.

Note: See TracTickets for help on using tickets.