Make WordPress Core

Changeset 36053


Ignore:
Timestamp:
12/21/2015 02:38:32 PM (11 years ago)
Author:
afercia
Message:

Accessibility: Remove the revisions limit title attribute from the Publish box.

The revisions limit warning is now always displayed in plain text even when the
limit is not reached yet. Removes the plus "+" from the revisions count number.

Fixes #35029.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r35801 r36053  
    886886.misc-pub-section {
    887887        padding: 6px 10px 8px;
     888}
     889
     890.misc-pub-revisions .howto {
     891        padding-left: 25px;
    888892}
    889893
  • trunk/src/wp-admin/includes/meta-boxes.php

    r35983 r36053  
    195195?>
    196196<div class="misc-pub-section misc-pub-revisions">
    197 <?php
    198         if ( $revisions_to_keep > 0 && $revisions_to_keep <= $args['args']['revisions_count'] ) {
    199                 echo '<span title="' . esc_attr( sprintf( __( 'Your site is configured to keep only the last %s revisions.' ),
    200                         number_format_i18n( $revisions_to_keep ) ) ) . '">';
    201                 printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '+</b>' );
    202                 echo '</span>';
    203         } else {
    204                 printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' );
    205         }
    206 ?>
     197        <?php printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' ); ?>
    207198        <a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a>
     199        <?php if ( $revisions_to_keep > 0 ) : ?>
     200        <span class="howto"><?php printf( __( 'Your site is configured to keep only the last %s revisions' ), number_format_i18n( $revisions_to_keep ) ) ?></span>
     201        <?php endif; ?>
    208202</div>
    209203<?php endif;
Note: See TracChangeset for help on using the changeset viewer.