Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#46093 closed defect (bug) (fixed)

User profile checkbox margin issue.

Reported by: punit5658's profile punit5658 Owned by: afercia's profile afercia
Milestone: 5.2 Priority: normal
Severity: normal Version: 3.3
Component: Users Keywords: has-patch
Focuses: accessibility, administration Cc:

Description

I found normal style issue in User profile admin area. There is no margin applied some of checkbox due to different HTML. I have added style for it copied from other checkbox generic styles. I will attach pictures to easily identify issue.Image 1 - Spacing issue between label and checkboxSpacing issue between label and checkbox.Spacing issue between label and checkbox after applied patch.Spacing issue between label and checkbox after applied patch.

Attachments (7)

img1.png (84.3 KB) - added by punit5658 6 years ago.
Image 1 - Spacing issue between label and checkbox
img2.png (87.1 KB) - added by punit5658 6 years ago.
Spacing issue between label and checkbox.
img3.png (80.1 KB) - added by punit5658 6 years ago.
Spacing issue between label and checkbox after applied patch.
img4.png (76.0 KB) - added by punit5658 6 years ago.
Spacing issue between label and checkbox after applied patch.
46093.diff (446 bytes) - added by punit5658 6 years ago.
Spacing issue between label and checkbox patch file.
wp32 user profile.png (4.3 KB) - added by afercia 6 years ago.
The show admin bar setting in WordPress 3.2
46093-1.diff (768 bytes) - added by punit5658 6 years ago.
Updated patch

Download all attachments as: .zip

Change History (11)

@punit5658
6 years ago

Image 1 - Spacing issue between label and checkbox

@punit5658
6 years ago

Spacing issue between label and checkbox.

@punit5658
6 years ago

Spacing issue between label and checkbox after applied patch.

@punit5658
6 years ago

Spacing issue between label and checkbox after applied patch.

@punit5658
6 years ago

Spacing issue between label and checkbox patch file.

#1 @afercia
6 years ago

  • Focuses accessibility added
  • Keywords needs-refresh added; needs-testing removed
  • Milestone changed from Awaiting Review to 5.2
  • Owner set to afercia
  • Status changed from new to assigned
  • Version changed from trunk to 3.3

@punit5658 thanks for your report. This is an interesting case.

As you've noticed, the markup is different. The "Show Toolbar when viewing site" checkbox is wrapped in a <fieldset> element (with a legend) even if it's only one checkbox. Instead, <fieldset> should only be used to group a set of related form controls together.

Turns out a few years ago, when the toolbar was still called "Admin Bar", there were two checkboxes (see attached screenshot). Then, in [18700] this option was simplified to have only one checkbox. However, the fieldset and legend survived to that change.

As there's now no reason to use a <fieldset> and a <legend>, I'd suggest to simply remove them instead of changing the CSS. This would also solve the margin issue in the mobile view.

@afercia
6 years ago

The show admin bar setting in WordPress 3.2

#2 @punit5658
6 years ago

@afercia Thanks for looking ticket. Here is your suggested patch.

@punit5658
6 years ago

Updated patch

#3 @afercia
6 years ago

  • Keywords needs-refresh removed

#4 @afercia
6 years ago

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

In 44756:

Accessibility: Remove unnecessary fieldset and legend elements from the User Profile page.

Also fixes a CSS margin issue in the mobile view.

Props punit5658.
Fixes #46093.

Note: See TracTickets for help on using tickets.