WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#40628 new enhancement

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

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

Description

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.
http://www.awesomescreenshot.com/image/2451426/6ea3628ba681f70e587594748a9147d8

Attachments (4)

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

Download all attachments as: .zip

Change History (12)

@Girishpanchal
3 weeks ago

#1 @Girishpanchal
3 weeks ago

  • Keywords has-patch added

#2 @afercia
3 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:
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-posts-list-table.php?rev=40361#L1124
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-list-table.php?rev=40361#L659

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

#3 @Girishpanchal
3 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.
http://www.awesomescreenshot.com/image/2455447/e13c74d4c1489ff1f6806c4a0b7aac42

I will add another patch for the category description column.

Thank you

#4 @afercia
3 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
3 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.

@Girishpanchal
3 weeks ago

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

#7 @afercia
3 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:
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php?rev=40310#L260

#8 @Girishpanchal
3 weeks ago

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

@Girishpanchal
2 weeks ago

Updated patch for multi-site.

Note: See TracTickets for help on using tickets.