WordPress.org

Make WordPress Core

Changeset 40573


Ignore:
Timestamp:
05/05/17 23:28:41 (9 months ago)
Author:
afercia
Message:

Accessibility: Improve the suggested image size text in the media views.

Adds pixels as unit, avoiding abbreviation for a clearer pronunciation by screen
readers. Also, adds the word by instead of the special character times.

Props Presskopp, stormrockwell.
Fixes #38932.

Location:
trunk/src/wp-includes
Files:
4 edited

Legend:

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

    r40359 r40573  
    40514051        if ( this.options.suggestedWidth && this.options.suggestedHeight ) { 
    40524052            this.toolbar.set( 'suggestedDimensions', new View({ 
    4053                 el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0], 
     4053                el: $( '<div class="instructions">' + l10n.suggestedDimensions.replace( '%1$s', this.options.suggestedWidth ).replace( '%2$s', this.options.suggestedHeight ) + '</div>' )[0], 
    40544054                priority: -40 
    40554055            }) ); 
  • trunk/src/wp-includes/js/media/views/attachments/browser.js

    r40359 r40573  
    320320        if ( this.options.suggestedWidth && this.options.suggestedHeight ) { 
    321321            this.toolbar.set( 'suggestedDimensions', new View({ 
    322                 el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0], 
     322                el: $( '<div class="instructions">' + l10n.suggestedDimensions.replace( '%1$s', this.options.suggestedWidth ).replace( '%2$s', this.options.suggestedHeight ) + '</div>' )[0], 
    323323                priority: -40 
    324324            }) ); 
  • trunk/src/wp-includes/media-template.php

    r40358 r40573  
    236236                <# if ( data.suggestedWidth && data.suggestedHeight ) { #> 
    237237                    <p class="suggested-dimensions"> 
    238                         <?php _e( 'Suggested image dimensions:' ); ?> {{data.suggestedWidth}} &times; {{data.suggestedHeight}} 
     238                        <?php 
     239                            /* translators: 1: suggested width number, 2: suggested height number. */ 
     240                            printf( __( 'Suggested image dimensions: %1$s by %2$s pixels.' ), '{{data.suggestedWidth}}', '{{data.suggestedHeight}}' ); 
     241                        ?> 
    239242                    </p> 
    240243                <# } #> 
  • trunk/src/wp-includes/media.php

    r40430 r40573  
    35453545        'cropYourImage' => __( 'Crop your image' ), 
    35463546        'cropping' => __( 'Cropping&hellip;' ), 
    3547         'suggestedDimensions' => __( 'Suggested image dimensions:' ), 
     3547        /* translators: 1: suggested width number, 2: suggested height number. */ 
     3548        'suggestedDimensions' => __( 'Suggested image dimensions: %1$s by %2$s pixels.' ), 
    35483549        'cropError' => __( 'There has been an error cropping your image.' ), 
    35493550 
Note: See TracChangeset for help on using the changeset viewer.