Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#38459 closed defect (bug) (fixed)

Checkbox have double label on single input field

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

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 10 years ago.
Screenshot of new user screen
38459.patch​ (1.2 KB ) - added by Ankit K Gupta 10 years ago.
added patch
38459.diff​ (2.5 KB ) - added by afercia 10 years ago.

Download all attachments as: .zip

Change History (8)

@Ankit K Gupta
10 years ago

Screenshot of new user screen

#1 @Ankit K Gupta
10 years ago

  • Keywords has-patch added

#2 @Ankit K Gupta
10 years ago

  • Summary Check box have duble label on single inpiy field → Checkbox have double label on single input field

#3 @afercia
10 years ago

  • Component Users → Networks and Sites
  • Focuses multisite added; administration removed

#4 @afercia
10 years ago

  • Milestone Awaiting Review → 4.7
  • Owner set to afercia
  • Status new → assigned
  • Version 4.6.1

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
10 years ago

  • Resolution → fixed
  • Status assigned → 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.