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.

Built from https://develop.svn.wordpress.org/trunk@40573


git-svn-id: http://core.svn.wordpress.org/trunk@40443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2017-05-05 23:29:44 +00:00
parent 471f1e7201
commit 88e515fac0
5 changed files with 10 additions and 6 deletions

View File

@ -4050,7 +4050,7 @@ AttachmentsBrowser = View.extend({
if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
this.toolbar.set( 'suggestedDimensions', new View({
el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0],
el: $( '<div class="instructions">' + l10n.suggestedDimensions.replace( '%1$s', this.options.suggestedWidth ).replace( '%2$s', this.options.suggestedHeight ) + '</div>' )[0],
priority: -40
}) );
}

File diff suppressed because one or more lines are too long

View File

@ -235,7 +235,10 @@ function wp_print_media_templates() {
<# if ( data.suggestedWidth && data.suggestedHeight ) { #>
<p class="suggested-dimensions">
<?php _e( 'Suggested image dimensions:' ); ?> {{data.suggestedWidth}} &times; {{data.suggestedHeight}}
<?php
/* translators: 1: suggested width number, 2: suggested height number. */
printf( __( 'Suggested image dimensions: %1$s by %2$s pixels.' ), '{{data.suggestedWidth}}', '{{data.suggestedHeight}}' );
?>
</p>
<# } #>

View File

@ -3544,7 +3544,8 @@ function wp_enqueue_media( $args = array() ) {
'cropImage' => __( 'Crop Image' ),
'cropYourImage' => __( 'Crop your image' ),
'cropping' => __( 'Cropping&hellip;' ),
'suggestedDimensions' => __( 'Suggested image dimensions:' ),
/* translators: 1: suggested width number, 2: suggested height number. */
'suggestedDimensions' => __( 'Suggested image dimensions: %1$s by %2$s pixels.' ),
'cropError' => __( 'There has been an error cropping your image.' ),
// Edit Audio

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40572';
$wp_version = '4.8-alpha-40573';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.