[wp-trac] [WordPress Trac] #48894: Improve the small user sub window at the right corner on the admin bar a.k.a. the Howdy fly-out

WordPress Trac noreply at wordpress.org
Mon Jun 22 18:36:17 UTC 2020


#48894: Improve the small user sub window at the right corner on the admin bar
a.k.a. the Howdy fly-out
-------------------------------------------------+-------------------------
 Reporter:  ixkaito                              |       Owner:  afercia
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.5
Component:  Toolbar                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-design-feedback has-patch      |     Focuses:  ui,
  has-screenshots                                |  accessibility
-------------------------------------------------+-------------------------

Comment (by sabernhardt):

 Appending "Profile" to the button text as `screen-reader-text` should be a
 better option than my `aria-label` idea.

 {{{
         $howdy = sprintf( __( 'Howdy, %s' ), '<span class="display-name">'
 . $current_user->display_name . '</span>' ) . '<span class="screen-reader-
 text"> ' . __( 'Profile' ) . '</span>';
 }}}

 (Creating a separate variable from `$howdy` for the extra `span` could
 make the code cleaner, though.)

 Then the button text starts with the visible part, and the word "Profile"
 gives more context for screen reader users who do not see the button.

 In English, NVDA would read the above example as "Howdy [pause] Name
 Profile menu button collapsed submenu clickable"

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48894#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list