[wp-trac] [WordPress Trac] #37556: Shiny Updates: aria-label not updated on failure on plugins.php

WordPress Trac noreply at wordpress.org
Wed Aug 3 17:57:23 UTC 2016


#37556: Shiny Updates: aria-label not updated on failure on plugins.php
-------------------------------------+-------------------------------------
 Reporter:  afercia                  |      Owner:
     Type:  defect (bug)             |     Status:  new
 Priority:  normal                   |  Milestone:  Awaiting Review
Component:  Plugins                  |    Version:  trunk
 Severity:  normal                   |   Keywords:  has-screenshots needs-
  Focuses:  accessibility,           |  patch
  javascript                         |
-------------------------------------+-------------------------------------
 When a plugin update on `plugins.php` fails, the plugin notice gets
 updated with an error message but the `aria-label` set on the paragraph
 still says "Updating {plugin name}...":

 [[Image(https://cldup.com/4rXFVKzWMV.png)]]

 Instead, in `plugin-install.php` the `aria-label` gets correctly updated:

 [[Image(https://cldup.com/bxOQqyUjxa.png)]]

 The fix looks simple, checking if a plugin name is returned in the
 response data:
 - if yes, update the aria-label using the plugin name
 - if not, it's a bit pointless to use an aria label in the first place, so
 remove it and let screen readers read the existing text

 Worth noting, while theoretically `aria-label` can be used on any element,
 and in this case is used on a paragraph, some screen readers read this
 attribute only on focusable elements or elements with some specific aria
 `role` attributes. I don't see this as a big deal in this specific case:
 whether screen readers will announce the `aria-label` or the existing
 text, the important thing is to ensure the messages are appropriate.

 Also, worth reminding `aria-label` completely overrides the existing
 element text.

 VoiceOver does announce the `aria-label` set on the paragraph and ignores
 the existing text.

 [[Image(https://cldup.com/oLIu3ddy2m.png)]]

 NVDA doesn't and reads out the existing text instead:

 [[Image(https://cldup.com/lsFCI-Yv4F.png)]]

 Patch incoming.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37556>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list