Make WordPress Core

Opened 7 weeks ago

Last modified 7 days ago

#40628 assigned enhancement

User list table admin: Need to replace blank space with "—" when first_name and last_name is blank

Reported by: Girishpanchal Owned by: afercia
Milestone: 4.8.1 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-refresh
Focuses: accessibility Cc:


When the user doesn't enter their first name and last name, admin panel the user listing page has listed blank space instead of "—" "Name" column like page listing. I have attached the screenshot for more clarification.

Attachments (5)

40628.patch (1.6 KB) - added by Girishpanchal 7 weeks ago.
40628.1.patch (728 bytes) - added by Girishpanchal 7 weeks ago.
40628.2.patch (737 bytes) - added by Girishpanchal 7 weeks ago.
Updated patch for class-wp-user-list-table.php
40628.3.patch (625 bytes) - added by Girishpanchal 7 weeks ago.
Updated patch for multi-site.
40628.4.patch (1.3 KB) - added by yahil 7 days ago.

Download all attachments as: .zip

Change History (15)

7 weeks ago

#1 @Girishpanchal
7 weeks ago

  • Keywords has-patch added

#2 @afercia
7 weeks ago

  • Focuses accessibility added; administration removed
  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 4.8
  • Version 4.7.4 deleted

@Girishpanchal thanks for your patch, makes sense to me! Ideally this should be implemented as in the other list tables, hiding the dash to assistive technologies and adding some hidden screen reader text. See for example:

In this case, the hidden text could be something like No name?

#3 @Girishpanchal
7 weeks ago

  • Keywords ui-feedback added

@afercia Can we use "Unknown" instead of "No name"?. Please let me know your thought then i will update patch for same.

Also i have found post category listing page where description is empty/blank.

I will add another patch for the category description column.

Thank you

#4 @afercia
7 weeks ago

"Unknown" makes sense to me and maybe it's even better. Screen readers already announce the column header "Name" so I'd say that hearing "Name ... unknown" is better than "Name ... No name" :)

Maybe such a string would need to give some context to translators though, so I'd consider to use _x().

Also i have found ...

Yep nice catch! Would you mind to open a separate ticket for that, please? It's always preferable to to keep things separated.

#5 @Girishpanchal
7 weeks ago

  • Keywords dev-feedback added; needs-refresh ui-feedback removed

Here, I have attached the patch for user listing table according to your suggestion.

Please check and let me know!

I will open new ticket for the post category description and will update patch for same.

7 weeks ago

Updated patch for class-wp-user-list-table.php

#7 @afercia
7 weeks ago

  • Keywords needs-refresh added; dev-feedback removed
  • Milestone changed from 4.8 to 4.8.1

The same should be done for the wp-admin/network/users.php screen on multisite, see:

#8 @Girishpanchal
7 weeks ago

Thank you for suggestion let me update patch for multisite !!

7 weeks ago

Updated patch for multi-site.

#9 @afercia
3 weeks ago

  • Owner set to afercia
  • Status changed from new to assigned

See also #40659.

#10 @yahil
7 days ago

@afercia I have made changes on existing .path to improve coding standard.

Solve phpcs notice:

  1. Whitespace found at end of line
  2. expected 1 space before/after closing bracket [ _x( 'Unknown' ); ]

7 days ago

Note: See TracTickets for help on using tickets.