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. git-svn-id: https://develop.svn.wordpress.org/trunk@40573 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3f6a8f2ca8
commit
f0b0147985
@ -4050,7 +4050,7 @@ AttachmentsBrowser = View.extend({
|
|||||||
|
|
||||||
if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
|
if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
|
||||||
this.toolbar.set( 'suggestedDimensions', new View({
|
this.toolbar.set( 'suggestedDimensions', new View({
|
||||||
el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' × ' + 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
|
priority: -40
|
||||||
}) );
|
}) );
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ AttachmentsBrowser = View.extend({
|
|||||||
|
|
||||||
if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
|
if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
|
||||||
this.toolbar.set( 'suggestedDimensions', new View({
|
this.toolbar.set( 'suggestedDimensions', new View({
|
||||||
el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' × ' + 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
|
priority: -40
|
||||||
}) );
|
}) );
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,10 @@ function wp_print_media_templates() {
|
|||||||
|
|
||||||
<# if ( data.suggestedWidth && data.suggestedHeight ) { #>
|
<# if ( data.suggestedWidth && data.suggestedHeight ) { #>
|
||||||
<p class="suggested-dimensions">
|
<p class="suggested-dimensions">
|
||||||
<?php _e( 'Suggested image dimensions:' ); ?> {{data.suggestedWidth}} × {{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>
|
</p>
|
||||||
<# } #>
|
<# } #>
|
||||||
|
|
||||||
|
@ -3544,7 +3544,8 @@ function wp_enqueue_media( $args = array() ) {
|
|||||||
'cropImage' => __( 'Crop Image' ),
|
'cropImage' => __( 'Crop Image' ),
|
||||||
'cropYourImage' => __( 'Crop your image' ),
|
'cropYourImage' => __( 'Crop your image' ),
|
||||||
'cropping' => __( 'Cropping…' ),
|
'cropping' => __( 'Cropping…' ),
|
||||||
'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.' ),
|
'cropError' => __( 'There has been an error cropping your image.' ),
|
||||||
|
|
||||||
// Edit Audio
|
// Edit Audio
|
||||||
|
Loading…
Reference in New Issue
Block a user