[wp-trac] [WordPress Trac] #39667: Improve showing metadata in media view

WordPress Trac noreply at wordpress.org
Mon May 1 13:28:42 UTC 2017


#39667: Improve showing metadata in media view
-------------------------------------------------+-------------------------
 Reporter:  Presskopp                            |       Owner:
     Type:  enhancement                          |  adamsilverstein
 Priority:  normal                               |      Status:  assigned
Component:  Media                                |   Milestone:  Awaiting
 Severity:  normal                               |  Review
 Keywords:  has-screenshots has-patch dev-       |     Version:
  feedback has-unit-tests                        |  Resolution:
                                                 |     Focuses:
                                                 |  accessibility
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 [attachment:39667.2.diff] is a slight cleanup of
 [attachment:39667-5.diff], changes include:
 * clean up documentation
 * move tests to functions.php, add one test to match discussed example
 * fix conditional in first logic check (`||` not `&&`)
 * rename helper function to `human_readable_duration`

 This could use some additional testing (especially with screen readers)
 and also screenshots showing the results. Is the aria-label announced when
 it changes, or do we need to call `wp.a11y.speak` explicitly?

 @afercia you can see the way the `human_readable_duration` function works
 by looking at the unit test in the patch. I added the test example you
 gave: `array( '1:02:00', '1 hour, 2 minutes, 0 seconds' )` (input, output)

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


More information about the wp-trac mailing list