Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#40628 closed enhancement (fixed)

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

Reported by: girishpanchal's profile Girishpanchal Owned by: afercia's profile afercia
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
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 years ago.
40628.1.patch (728 bytes) - added by Girishpanchal 7 years ago.
40628.2.patch (737 bytes) - added by Girishpanchal 7 years ago.
Updated patch for class-wp-user-list-table.php
40628.3.patch (625 bytes) - added by Girishpanchal 7 years ago.
Updated patch for multi-site.
40628.4.patch (1.3 KB) - added by yahil 7 years ago.

Download all attachments as: .zip

Change History (18)

7 years ago

#1 @Girishpanchal
7 years ago

  • Keywords has-patch added

#2 @afercia
7 years 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 years 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 years 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 years 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 years ago

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

#7 @afercia
7 years 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 years ago

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

7 years ago

Updated patch for multi-site.

#9 @afercia
7 years ago

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

See also #40659.

#10 @yahil
7 years 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 years ago

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

7 years ago

#12 @SergeyBiryukov
7 years ago

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

In 40956:

Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.

Props Girishpanchal, yahil.
Fixes #40628.

#13 @SergeyBiryukov
7 years ago

  • Keywords needs-refresh removed
  • Milestone changed from 4.8.1 to 4.9
Note: See TracTickets for help on using tickets.