WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/08/2018 04:19:40 AM (14 months ago)
Author:
adamsilverstein
Message:

Media: Improve display and accessibility of meta data in detail view.

  • Add a human_readable_duration function including tests.
  • Add 'pixels' after image width/height.
  • Add screen reader text for durations.

Props Presskopp, kiranpotphode, milindmore22, stormrockwell, afercia.
Fixes #39667.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r43582 r43633  
    33793379    if ( $meta && ( 'audio' === $type || 'video' === $type ) ) {
    33803380        if ( isset( $meta['length_formatted'] ) ) {
    3381             $response['fileLength'] = $meta['length_formatted'];
     3381            $response['fileLength']              = $meta['length_formatted'];
     3382            $response['fileLengthHumanReadable'] = human_readable_duration( $meta['length_formatted'] );
    33823383        }
    33833384
Note: See TracChangeset for help on using the changeset viewer.