Site Icon: Improve a11y in Settings.
Props afercia. Fixes #32970. Built from https://develop.svn.wordpress.org/trunk@33180 git-svn-id: http://core.svn.wordpress.org/trunk@33152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
967b04a7f8
commit
13ab10fff7
|
@ -26,8 +26,8 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-icon-crop-preview-shell h3 {
|
.site-icon-crop-preview-shell h2 {
|
||||||
margin-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-icon-crop-favicon-preview-shell {
|
.site-icon-crop-favicon-preview-shell {
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-icon-crop-preview-shell h3 {
|
.site-icon-crop-preview-shell h2 {
|
||||||
margin-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-icon-crop-favicon-preview-shell {
|
.site-icon-crop-favicon-preview-shell {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -759,7 +759,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||||
|
|
||||||
<form method="post" action="<?php echo esc_url(add_query_arg('step', 3)); ?>">
|
<form method="post" action="<?php echo esc_url(add_query_arg('step', 3)); ?>">
|
||||||
<p class="hide-if-no-js"><?php _e('Choose the part of the image you want to use as your header.'); ?></p>
|
<p class="hide-if-no-js"><?php _e('Choose the part of the image you want to use as your header.'); ?></p>
|
||||||
<p class="hide-if-js"><strong><?php _e( 'You need Javascript to choose a part of the image.'); ?></strong></p>
|
<p class="hide-if-js"><strong><?php _e( 'You need JavaScript to choose a part of the image.'); ?></strong></p>
|
||||||
|
|
||||||
<div id="crop_image" style="position: relative">
|
<div id="crop_image" style="position: relative">
|
||||||
<img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
|
<img src="<?php echo esc_url( $url ); ?>" id="upload" width="<?php echo $width; ?>" height="<?php echo $height; ?>" />
|
||||||
|
|
|
@ -266,27 +266,27 @@ class WP_Site_Icon {
|
||||||
<div class="site-icon-crop-shell">
|
<div class="site-icon-crop-shell">
|
||||||
<form action="options-general.php" method="post" enctype="multipart/form-data">
|
<form action="options-general.php" method="post" enctype="multipart/form-data">
|
||||||
<p class="hide-if-no-js description"><?php _e('Choose the part of the image you want to use as your site icon.'); ?></p>
|
<p class="hide-if-no-js description"><?php _e('Choose the part of the image you want to use as your site icon.'); ?></p>
|
||||||
<p class="hide-if-js description"><strong><?php _e( 'You need Javascript to choose a part of the image.'); ?></strong></p>
|
<p class="hide-if-js description"><strong><?php _e( 'You need JavaScript to choose a part of the image.'); ?></strong></p>
|
||||||
|
|
||||||
<div class="site-icon-crop-wrapper">
|
<div class="site-icon-crop-wrapper">
|
||||||
<img src="<?php echo esc_url( $url ); ?>" id="crop-image" class="site-icon-crop-image" width="512" height="" alt="<?php esc_attr_e( 'Image to be cropped' ); ?>"/>
|
<img src="<?php echo esc_url( $url ); ?>" id="crop-image" class="site-icon-crop-image" width="512" height="" alt="<?php esc_attr_e( 'Image to be cropped' ); ?>"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="site-icon-crop-preview-shell hide-if-no-js">
|
<div class="site-icon-crop-preview-shell hide-if-no-js">
|
||||||
<h3><?php _e( 'Preview' ); ?></h3>
|
<h2><?php _e( 'Preview' ); ?></h2>
|
||||||
<strong><?php _e( 'As a browser icon' ); ?></strong>
|
<strong><?php _e( 'As a browser icon' ); ?></strong>
|
||||||
<div class="site-icon-crop-favicon-preview-shell">
|
<div class="site-icon-crop-favicon-preview-shell">
|
||||||
<img src="images/browser.png" class="site-icon-browser-preview" width="182" height="" alt="<?php esc_attr_e( 'Browser Chrome' ); ?>"/>
|
<img src="images/browser.png" class="site-icon-browser-preview" width="182" height="" alt=""/>
|
||||||
|
|
||||||
<div class="site-icon-crop-preview-favicon">
|
<div class="site-icon-crop-preview-favicon">
|
||||||
<img src="<?php echo esc_url( $url ); ?>" id="preview-favicon" alt="<?php esc_attr_e( 'Preview Favicon' ); ?>"/>
|
<img src="<?php echo esc_url( $url ); ?>" id="preview-favicon" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
|
||||||
</div>
|
</div>
|
||||||
<span class="site-icon-browser-title"><?php bloginfo( 'name' ); ?></span>
|
<span class="site-icon-browser-title"><?php bloginfo( 'name' ); ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<strong><?php _e( 'As an app icon' ); ?></strong>
|
<strong><?php _e( 'As an app icon' ); ?></strong>
|
||||||
<div class="site-icon-crop-preview-homeicon">
|
<div class="site-icon-crop-preview-homeicon">
|
||||||
<img src="<?php echo esc_url( $url ); ?>" id="preview-homeicon" alt="<?php esc_attr_e( 'Preview Home Icon' ); ?>"/>
|
<img src="<?php echo esc_url( $url ); ?>" id="preview-homeicon" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
<p class="description" id="tagline-description"><?php _e( 'In a few words, explain what this site is about.' ) ?></p></td>
|
<p class="description" id="tagline-description"><?php _e( 'In a few words, explain what this site is about.' ) ?></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="site_icon"><?php _e( 'Site Icon' ); ?></label></th>
|
<th scope="row"><?php _e( 'Site Icon' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$upload_url = admin_url( 'options-general.php?page=site-icon' );
|
$upload_url = admin_url( 'options-general.php?page=site-icon' );
|
||||||
|
@ -143,9 +143,8 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
), wp_nonce_url( admin_url( 'options-general.php' ), 'remove-site-icon' ) );
|
), wp_nonce_url( admin_url( 'options-general.php' ), 'remove-site-icon' ) );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<img class="avatar avatar-150" src="<?php site_icon_url( null, 150 ); ?>" height="150" width="150" />
|
<img class="avatar avatar-150" src="<?php site_icon_url( null, 150 ); ?>" height="150" width="150" alt="" />
|
||||||
<p class="hide-if-no-js">
|
<p class="hide-if-no-js">
|
||||||
<label class="screen-reader-text" for="choose-from-library-link"><?php _e( 'Choose an image from your media library:' ); ?></label>
|
|
||||||
<button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $GLOBALS['wp_site_icon']->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>"><?php _e( 'Update Site Icon' ); ?></button>
|
<button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $GLOBALS['wp_site_icon']->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>"><?php _e( 'Update Site Icon' ); ?></button>
|
||||||
<a href="<?php echo esc_url( $remove_url ); ?>"><?php _e( 'Remove Site Icon' ); ?></a>
|
<a href="<?php echo esc_url( $remove_url ); ?>"><?php _e( 'Remove Site Icon' ); ?></a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -157,13 +156,12 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<p class="hide-if-no-js">
|
<p class="hide-if-no-js">
|
||||||
<label class="screen-reader-text" for="choose-from-library-link"><?php _e( 'Choose an image from your media library:' ); ?></label>
|
<button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $GLOBALS['wp_site_icon']->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>" aria-label="<?php esc_attr_e( 'Choose an image from your media library' ); ?>" aria-describedby="site-icon-description"><?php _e( 'Choose Image' ); ?></button>
|
||||||
<button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $GLOBALS['wp_site_icon']->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>"><?php _e( 'Choose Image' ); ?></button>
|
|
||||||
</p>
|
</p>
|
||||||
<a class="button hide-if-js" href="<?php echo esc_url( $upload_url ); ?>"><?php _e( 'Add a Site Icon' ); ?></a>
|
<a class="button hide-if-js" href="<?php echo esc_url( $upload_url ); ?>"><?php _e( 'Add a Site Icon' ); ?></a>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p class="description"><?php _e( 'The Site Icon is used as a browser and app icon for your site.' ); ?></p>
|
<p id="site-icon-description" class="description"><?php _e( 'The Site Icon is used as a browser and app icon for your site.' ); ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ( !is_multisite() ) { ?>
|
<?php if ( !is_multisite() ) { ?>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-beta2-33179';
|
$wp_version = '4.3-beta2-33180';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue