mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Accessibility: add missing labels for Plugins and Themes checkboxes in the Updates screen.
Also, adds translator comments and improves readability. Props SergeyBiryukov, afercia, oaron for the initial patch. Fixes #34774. Built from https://develop.svn.wordpress.org/trunk@35952 git-svn-id: http://core.svn.wordpress.org/trunk@35916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c2fcab7d82
commit
6dac60da98
@ -307,12 +307,28 @@ function list_plugin_updates() {
|
||||
/* translators: 1: Plugin name 2: Plugin version */
|
||||
$details_text = sprintf( __( 'View %1$s version %2$s details.' ), $details_name, $plugin_data->update->new_version );
|
||||
$details = sprintf( '<a href="%1$s" class="thickbox">%2$s</a>', esc_url( $details_url ), $details_text );
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th>
|
||||
<td><p><strong>{$plugin_data->Name}</strong><br />" . sprintf(__('You have version %1$s installed. Update to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . ' ' . $details . $compat . $upgrade_notice . "</p></td>
|
||||
</tr>";
|
||||
$checkbox_id = "checkbox_" . md5( $plugin_data->Name );
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row" class="check-column">
|
||||
<label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
|
||||
/* translators: %s: plugin name */
|
||||
printf( __( 'Select %s' ),
|
||||
$plugin_data->Name
|
||||
);
|
||||
?></label>
|
||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
|
||||
</th>
|
||||
<td><p><strong><?php echo $plugin_data->Name; ?></strong><br /><?php
|
||||
/* translators: 1: plugin version, 2: new version */
|
||||
printf( __( 'You have version %1$s installed. Update to %2$s.' ),
|
||||
$plugin_data->Version,
|
||||
$plugin_data->update->new_version
|
||||
);
|
||||
echo ' ' . $details . $compat . $upgrade_notice;
|
||||
?></p></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
@ -359,11 +375,31 @@ function list_theme_updates() {
|
||||
<tbody class="plugins">
|
||||
<?php
|
||||
foreach ( $themes as $stylesheet => $theme ) {
|
||||
echo "
|
||||
<tr>
|
||||
<th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr( $stylesheet ) . "' /></th>
|
||||
<td class='plugin-title'><img src='" . esc_url( $theme->get_screenshot() ) . "' width='85' height='64' style='float:left; padding: 0 5px 5px' alt='' /><strong>" . $theme->display('Name') . '</strong> ' . sprintf( __( 'You have version %1$s installed. Update to %2$s.' ), $theme->display('Version'), $theme->update['new_version'] ) . "</td>
|
||||
</tr>";
|
||||
$checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row" class="check-column">
|
||||
<label for="<?php echo $checkbox_id; ?>" class="screen-reader-text"><?php
|
||||
/* translators: %s: theme name */
|
||||
printf( __( 'Select %s' ),
|
||||
$theme->display( 'Name' )
|
||||
);
|
||||
?></label>
|
||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
|
||||
</th>
|
||||
<td class="plugin-title">
|
||||
<img src="<?php echo esc_url( $theme->get_screenshot() ); ?>" width="85" height="64" style="float:left; padding: 0 5px 5px" alt="" />
|
||||
<strong><?php echo $theme->display( 'Name' ); ?></strong>
|
||||
<?php
|
||||
/* translators: 1: theme version, 2: new version */
|
||||
printf( __( 'You have version %1$s installed. Update to %2$s.' ),
|
||||
$theme->display( 'Version' ),
|
||||
$theme->update['new_version']
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-35951';
|
||||
$wp_version = '4.5-alpha-35952';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user