WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 14 months ago

Last modified 14 months ago

#20271 closed defect (bug) (fixed)

Un-marked up text in the Add Users admin section for multi-site

Reported by: topher1kenobe Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.0
Component: Users Keywords: has-patch
Focuses: ui, multisite Cc:

Description

When looking at the page for adding a new user on a multi-site setup, the top option is to add an existing user.

This text: "Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite."

has no html markup around it. Immediately above it is an h3 tag. The text should have a <p> around it at the very least.

My goal here is actually hide the whole section with css for some roles, but I have no way to refer to it.

Attachments (3)

20271-1.diff (1.2 KB) - added by jkudish 3 years ago.
adds a paragraph around the text with id "add-existing-user-text"
20271.2.patch (989 bytes) - added by SergeyBiryukov 3 years ago.
20271.3.patch (1.5 KB) - added by topher1kenobe 3 years ago.
My version wraps the entire area in a div and applies a simple p to the paragraph.

Download all attachments as: .zip

Change History (12)

@jkudish3 years ago

adds a paragraph around the text with id "add-existing-user-text"

comment:1 @jkudish3 years ago

  • Cc joachim.kudish@… added
  • Keywords has-patch added

comment:2 follow-up: @helenyhou3 years ago

A thought - if the goal is to target via CSS, the adjacent sibling selector should do just fine, as in #add-existing-user + p. The paragraph tag probably doesn't really need an ID.

comment:3 in reply to: ↑ 2 @jkudish3 years ago

Replying to helenyhou:

A thought - if the goal is to target via CSS, the adjacent sibling selector should do just fine, as in #add-existing-user + p. The paragraph tag probably doesn't really need an ID.

That's true. Added the ID just for the sake of it, though having it makes for a slightly more efficient css selector

@SergeyBiryukov3 years ago

@topher1kenobe3 years ago

My version wraps the entire area in a div and applies a simple p to the paragraph.

comment:4 @topher1kenobe3 years ago

I've attached a patch of my own (my first, thanks markjaquith and jjj. It wraps the entire area in a wrapper div and puts the proper html on the contents.

comment:5 @sabreuse3 years ago

  • Component changed from UI to Users
  • Keywords ui-focus added

comment:6 @topher1kenobe15 months ago

  • Focuses multisite added
  • Version changed from 3.3.1 to 3.0

At WordCamp Austin dev day, verified issue remains.

comment:7 @SergeyBiryukov15 months ago

  • Milestone changed from Awaiting Review to 4.0

comment:8 @SergeyBiryukov14 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28642:

Add paragraph tags to 'Add Existing User' section on 'Add New User' screen in multisite.

props jkudish, topher1kenobe.
fixes #20271.

comment:9 @SergeyBiryukov14 months ago

I think the wrapper div is not necessary, we don't have it in "Add New User" section.

You can use an adjacent sibling selector to hide the section, as noted in comment:2.

Note: See TracTickets for help on using tickets.