Make WordPress Core


Ignore:
Timestamp:
06/26/2015 05:00:42 AM (11 years ago)
Author:
wonderboymusic
Message:

In Media microtemplates after [32467], use <button> instead of <a> for several more non-links.

Props afercia.
Fixes #26550.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r32909 r32952  
    167167        <script type="text/html" id="tmpl-media-modal">
    168168                <div class="<?php echo $class; ?>">
    169                         <a class="media-modal-close" href="#"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></a>
     169                        <button type="button" class="button-link media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button>
    170170                        <div class="media-modal-content"></div>
    171171                </div>
     
    262262        <script type="text/html" id="tmpl-uploader-status">
    263263                <h3><?php _e( 'Uploading' ); ?></h3>
    264                 <a class="upload-dismiss-errors" href="#"><?php _e('Dismiss Errors'); ?></a>
     264                <button type="button" class="button-link upload-dismiss-errors"><span class="screen-reader-text"><?php _e( 'Dismiss Errors' ); ?></span></button>
    265265
    266266                <div class="media-progress-bar"><div></div></div>
     
    435435                                        <?php if ( MEDIA_TRASH ): ?>
    436436                                                <# if ( 'trash' === data.status ) { #>
    437                                                         <a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>
     437                                                        <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button>
    438438                                                <# } else { #>
    439                                                         <a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>
     439                                                        <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button>
    440440                                                <# } #>
    441441                                        <?php else: ?>
    442                                                 <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
     442                                                <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
    443443                                        <?php endif; ?>
    444444                                <# } #>
     
    471471                        </div>
    472472                        <# if ( data.buttons.close ) { #>
    473                                 <a class="close media-modal-icon" href="#" title="<?php esc_attr_e('Remove'); ?>"></a>
     473                                <button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text"><?php _e( 'Remove' ); ?></span></button>
    474474                        <# } #>
    475475                </div>
    476476                <# if ( data.buttons.check ) { #>
    477                         <a class="check" href="#" title="<?php esc_attr_e('Deselect'); ?>" tabindex="-1"><div class="media-modal-icon"></div></a>
     477                        <button type="button" class="button-link check" tabindex="-1"><span class="media-modal-icon"></span><span class="screen-reader-text"><?php _e( 'Deselect' ); ?></span></button>
    478478                <# } #>
    479479                <#
     
    537537                                        <?php if ( MEDIA_TRASH ): ?>
    538538                                        <# if ( 'trash' === data.status ) { #>
    539                                                 <a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>
     539                                                <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button>
    540540                                        <# } else { #>
    541                                                 <a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>
     541                                                <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button>
    542542                                        <# } #>
    543543                                        <?php else: ?>
    544                                                 <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
     544                                                <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
    545545                                        <?php endif; ?>
    546546                                <# } #>
     
    596596                        <span class="count"></span>
    597597                        <# if ( data.editable ) { #>
    598                                 <a class="edit-selection" href="#"><?php _e( 'Edit Selection' ); ?></a>
     598                                <button type="button" class="button-link edit-selection"><?php _e( 'Edit Selection' ); ?></button>
    599599                        <# } #>
    600600                        <# if ( data.clearable ) { #>
    601                                 <a class="clear-selection" href="#"><?php _e('Clear'); ?></a>
     601                                <button type="button" class="button-link clear-selection"><?php _e( 'Clear' ); ?></button>
    602602                        <# } #>
    603603                </div>
     
    992992                                        </div>
    993993                                        <div class="advanced-section">
    994                                                 <h3><a class="advanced-toggle" href="#"><?php _e('Advanced Options'); ?></a></h3>
     994                                                <h3><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h3>
    995995                                                <div class="advanced-settings hidden">
    996996                                                        <div class="advanced-image">
     
    10491049                                        <span>SRC</span>
    10501050                                        <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
    1051                                         <a class="remove-setting"><?php _e( 'Remove' ); ?></a>
     1051                                        <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button>
    10521052                                </label>
    10531053                                <# } #>
     
    10631063                                        <span><?php echo strtoupper( $type ) ?></span>
    10641064                                        <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" />
    1065                                         <a class="remove-setting"><?php _e( 'Remove' ); ?></a>
     1065                                        <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button>
    10661066                                </label>
    10671067                                <# } #>
     
    11321132                                        <span>SRC</span>
    11331133                                        <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" />
    1134                                         <a class="remove-setting"><?php _e( 'Remove' ); ?></a>
     1134                                        <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button>
    11351135                                </label>
    11361136                                <# } #>
     
    11441144                                        <span><?php echo strtoupper( $type ) ?></span>
    11451145                                        <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" />
    1146                                         <a class="remove-setting"><?php _e( 'Remove' ); ?></a>
     1146                                        <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button>
    11471147                                </label>
    11481148                                <# } #>
     
    11651165                                        <span><?php _e( 'Poster Image' ); ?></span>
    11661166                                        <input type="text" disabled="disabled" data-setting="poster" value="{{ data.model.poster }}" />
    1167                                         <a class="remove-setting"><?php _e( 'Remove' ); ?></a>
     1167                                        <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button>
    11681168                                </label>
    11691169                                <# } #>
     
    11971197                                                <p>
    11981198                                                        <input class="content-track" type="text" value="{{ track.outerHTML }}" />
    1199                                                         <a class="remove-setting remove-track"><?php _e( 'Remove' ); ?></a>
     1199                                                        <button type="button" class="button-link remove-setting remove-track"><?php _ex( 'Remove', 'media' ); ?></button>
    12001200                                                </p>
    12011201                                                <# } ); #>
Note: See TracChangeset for help on using the changeset viewer.