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

WordPress Trac noreply at wordpress.org
Sat Sep 8 16:35:13 UTC 2018


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

Comment (by adamsilverstein):

 @birgire Thanks for the additional feedback and review.

 > It seems that the maximum duration supported by that function is
 39:59:59. It comes from the reg-ex. I doubt it will be ever passed in
 reality, but maybe we should document it in the functions description?

 Hmmm, didn't realize that. It would be good to support a larger number of
 hours, can we fix that? (feel free to reopen with improvements)

 > It also seems to be able to generate negative playstrings, should that
 be considered here?

 Worth testing, seems like an edge case.

 > Example 00:00:01 is generated as 0 hours, 0 minutes, 1 second but would
 it make sense to generate only 1 second? But then it's not obvious what
 string 00:00:00 should generate :-)

 > If I remember correctly human_time_diff() doesn't display 0-parts? Or
 maybe we shouldn't do such a comparison here, as it's not exactly the same
 kind of data.

 The purpose/use case for this function is to provide clear screen
 reader/assistive text. We need to describe the zeros if they are passed to
 the function - however in practice the media modal *already* strips off
 prefix zeros before passing the duration string to this function, so there
 won't be any zeros being passed in the media modal use.

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


More information about the wp-trac mailing list